mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 05:57:49 +02:00
avcodec/ptx: Check that the input contains at least one line
Fixes: Timeout (19sec -> 44ms) Fixes: 17816/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PTX_fuzzer-5704459950227456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a6ad328256fe6a6ace7d1e15f3515afccf1247fc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d08362ecbc
commit
2c6beca3dc
@ -55,6 +55,9 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
|
|
||||||
buf += offset;
|
buf += offset;
|
||||||
|
|
||||||
|
if (buf_end - buf < w * bytes_per_pixel)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
|
if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user