mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/rasc: Check that the number of moves is less than or equal the number of pixels
Fixes: OOM Fixes: 10307/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5393974559244288 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b11b3d2585
commit
092cb17983
@ -215,7 +215,7 @@ static int decode_move(AVCodecContext *avctx,
|
||||
bytestream2_skip(gb, 8);
|
||||
compression = bytestream2_get_le32(gb);
|
||||
|
||||
if (nb_moves > INT32_MAX / 16)
|
||||
if (nb_moves > INT32_MAX / 16 || nb_moves > avctx->width * avctx->height)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
uncompressed_size = 16 * nb_moves;
|
||||
|
Loading…
Reference in New Issue
Block a user