mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/dnxhd_parser: Fix parser when input does not have nicely sized packets
Fixes: out of array access Fixes: 15522/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DNXHD_fuzzer-5747756078989312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f6d1b18b3d
commit
2d900d8fe0
1 changed files with 2 additions and 1 deletions
|
|
@ -79,8 +79,9 @@ static int dnxhd_find_frame_end(DNXHDParserContext *dctx,
|
||||||
if (remaining <= 0)
|
if (remaining <= 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
remaining += i - 47;
|
||||||
dctx->remaining = remaining;
|
dctx->remaining = remaining;
|
||||||
if (buf_size - i + 47 >= dctx->remaining) {
|
if (buf_size >= dctx->remaining) {
|
||||||
pc->frame_start_found = 0;
|
pc->frame_start_found = 0;
|
||||||
pc->state64 = -1;
|
pc->state64 = -1;
|
||||||
dctx->cur_byte = 0;
|
dctx->cur_byte = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue