mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avformat/mov: disallow a zero sample size in trun atoms
In order to not generate 0 sized packets or create a huge index table needlessly. Fixes: Timeout Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Fixes: 45738/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6142535657979904 Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
7acc124121
commit
03d81a044a
1 changed files with 2 additions and 0 deletions
|
|
@ -5179,6 +5179,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||
distance++;
|
||||
if (av_sat_add64(dts, sample_duration) != dts + (uint64_t)sample_duration)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (!sample_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
dts += sample_duration;
|
||||
offset += sample_size;
|
||||
sc->data_size += sample_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue