[FFmpeg-cvslog] avcodec/argo: Check for even dimensions
Michael Niedermayer
git at videolan.org
Wed Sep 8 22:43:52 EEST 2021
ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jul 31 12:41:34 2021 +0200| [725a0446b409d20a8fb762e5804b170808a52001] | committer: Michael Niedermayer
avcodec/argo: Check for even dimensions
Fixes: reading over the end
Fixes: 36346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5366943107383296
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 c2f5e9ff3c8141fe6a2c08f3cc4e46e17b96cbb4)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=725a0446b409d20a8fb762e5804b170808a52001
---
libavcodec/argo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/argo.c b/libavcodec/argo.c
index 7358d102e3..7074561956 100644
--- a/libavcodec/argo.c
+++ b/libavcodec/argo.c
@@ -685,6 +685,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_PATCHWELCOME;
}
+ if (avctx->width % 2 || avctx->height % 2) {
+ avpriv_request_sample(s, "Odd dimensions\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
s->frame = av_frame_alloc();
if (!s->frame)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list