[FFmpeg-cvslog] avcodec/nuv: rtjpeg with dimensions less than 16 would result in no decoded pixels thus reject it
Michael Niedermayer
git at videolan.org
Tue Jul 10 12:04:04 EEST 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 27 15:17:12 2018 +0100| [b4e66382c207a3fd1e5e1aee0882b367c65e18c8] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 939440ad1aa820bed51f54d273b4fa6c5016d9f9)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4e66382c207a3fd1e5e1aee0882b367c65e18c8
---
libavcodec/nuv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 1dfa399630..5294167034 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -196,6 +196,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
case NUV_RTJPEG_IN_LZO:
case NUV_RTJPEG:
keyframe = !buf[2];
+ if (c->width < 16 || c->height < 16) {
+ return AVERROR_INVALIDDATA;
+ }
break;
case NUV_COPY_LAST:
keyframe = 0;
More information about the ffmpeg-cvslog
mailing list