aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-10-10 23:13:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-21 19:21:14 +0200
commit32b68a62328a98e8ea5fb8b8a4c09704ff565334 (patch)
tree9921714106a6ff240e22e23d6e2268f61d537e82
parentbac4bb747a233f23b3183594207328f4a067e1fb (diff)
downloadffmpeg-32b68a62328a98e8ea5fb8b8a4c09704ff565334.tar.gz
avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2()
Fixes: out of array access Fixes: 39736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-4820016722214912 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 17e36fac0b5432f67e25adca7186c57f2dbe1c71) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 08c37a1d93..825094d2f3 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -268,6 +268,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
h_align = 4;
}
if (s->codec_id == AV_CODEC_ID_JV ||
+ s->codec_id == AV_CODEC_ID_ARGO ||
s->codec_id == AV_CODEC_ID_INTERPLAY_VIDEO) {
w_align = 8;
h_align = 8;
@@ -298,8 +299,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
break;
case AV_PIX_FMT_BGR0:
if (s->codec_id == AV_CODEC_ID_ARGO) {
- w_align = 4;
- h_align = 4;
+ w_align = 8;
+ h_align = 8;
}
break;
default: