mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/nuv: rtjpeg with dimensions less than 16 would result in no decoded pixels thus reject it
Fixes: Timeout
Fixes: 6297/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-4882404863901696
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 939440ad1a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e623800387
commit
f4fe702258
@ -199,6 +199,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
case NUV_RTJPEG_IN_LZO:
|
case NUV_RTJPEG_IN_LZO:
|
||||||
case NUV_RTJPEG:
|
case NUV_RTJPEG:
|
||||||
keyframe = !buf[2];
|
keyframe = !buf[2];
|
||||||
|
if (c->width < 16 || c->height < 16) {
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NUV_COPY_LAST:
|
case NUV_COPY_LAST:
|
||||||
keyframe = 0;
|
keyframe = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user