-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fmp4: prevent RAM exhaustion by limiting max sample count (#140)
- Loading branch information
Showing
4 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
// Package fmp4 contains a fragmented-MP4 reader and writer. | ||
package fmp4 | ||
|
||
const ( | ||
maxSamplesPerTrun = 120 * 160 // 120fps * 60 seconds | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
pkg/formats/fmp4/testdata/fuzz/FuzzPartsUnmarshal/971288027908400b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
go test fuzz v1 | ||
[]byte("\x00\x00\x00\xc8moof\x00\x00\x00\x10mfhd\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00`traf\x00\x00\x00\x10tfhd\x00\x00\x00\x00\x00\x01_\x90\x00\x00\x004trun\x00\x01\x00\x00\xf9\xff\xff\x00") |
2 changes: 2 additions & 0 deletions
2
pkg/formats/fmp4/testdata/fuzz/FuzzPartsUnmarshal/aa157382146cae53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
go test fuzz v1 | ||
[]byte("0000moof\x00\x00\x00\x10mfhd\x00000000000 0traf\x00\x00\x00\x10tfhd\x0000\x00000000\x000trun") |