aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-03 16:51:07 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-05 23:19:39 +0200
commit7d313a14a1a7c1f977a970414806c141e609f967 (patch)
tree536ed2fcbdeeaf38e2b8378cd1046b46ab21e308
parentb90ce02f818fefa320a758ad0f76498d77de4da7 (diff)
downloadffmpeg-7d313a14a1a7c1f977a970414806c141e609f967.tar.gz
avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensions
Fixes: out of array access Fixes: 37197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5877046382297088 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 018b611b4ba74a5cecfb8a75a637b49840e7c320) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 434004cccf..08c37a1d93 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -296,6 +296,12 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
h_align = 4;
}
break;
+ case AV_PIX_FMT_BGR0:
+ if (s->codec_id == AV_CODEC_ID_ARGO) {
+ w_align = 4;
+ h_align = 4;
+ }
+ break;
default:
break;
}