mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
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>
This commit is contained in:
parent
bac4bb747a
commit
32b68a6232
@ -268,6 +268,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
|||||||
h_align = 4;
|
h_align = 4;
|
||||||
}
|
}
|
||||||
if (s->codec_id == AV_CODEC_ID_JV ||
|
if (s->codec_id == AV_CODEC_ID_JV ||
|
||||||
|
s->codec_id == AV_CODEC_ID_ARGO ||
|
||||||
s->codec_id == AV_CODEC_ID_INTERPLAY_VIDEO) {
|
s->codec_id == AV_CODEC_ID_INTERPLAY_VIDEO) {
|
||||||
w_align = 8;
|
w_align = 8;
|
||||||
h_align = 8;
|
h_align = 8;
|
||||||
@ -298,8 +299,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
|||||||
break;
|
break;
|
||||||
case AV_PIX_FMT_BGR0:
|
case AV_PIX_FMT_BGR0:
|
||||||
if (s->codec_id == AV_CODEC_ID_ARGO) {
|
if (s->codec_id == AV_CODEC_ID_ARGO) {
|
||||||
w_align = 4;
|
w_align = 8;
|
||||||
h_align = 4;
|
h_align = 8;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user