mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/rtv1: fix undefined FFALIGN
Fixes: signed integer overflow: 2147483647 + 4 cannot be represented in type 'int'
Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RTV1_fuzzer-6324303861514240
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 d188a86730
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
aa4cf7a584
commit
9a5f191bfb
|
@ -113,6 +113,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
|
|||
|
||||
width = bytestream2_get_le32(&gb);
|
||||
height = bytestream2_get_le32(&gb);
|
||||
if (width > INT_MAX-4U || height > INT_MAX-4U)
|
||||
return AVERROR_INVALIDDATA;
|
||||
ret = ff_set_dimensions(avctx, FFALIGN(width, 4), FFALIGN(height, 4));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue