History

avcodec/pngdec: Check that previous_picture has same w/h/format

Fixes: out of array access Fixes: 15540/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5684905029140480

Michael Niedermayer committed 7 years ago

Commit 18c808f1 parent 9ffa32b1 file · +3 −0Browse files

Unified · Split

libavcodec/pngdec.c+3−0
@@ -1391,6 +1391,9 @@ exit_loop: · 1390 unmodified lines
13911391 if (CONFIG_PNG_DECODER && avctx->codec_id != AV_CODEC_ID_APNG)
13921392 handle_p_frame_png(s, p);
13931393 else if (CONFIG_APNG_DECODER &&
1394+ s->previous_picture.f->width == p->width &&
1395+ s->previous_picture.f->height== p->height &&
1396+ s->previous_picture.f->format== p->format &&
13941397 avctx->codec_id == AV_CODEC_ID_APNG &&
13951398 (ret = handle_p_frame_apng(avctx, s, p)) < 0)
13961399 goto fail;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t