Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-6593408795279360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavformat/westwood_vqa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index e3d2e2668c4..bd8df5e0b34 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -274,6 +274,8 @@ static int wsvqa_read_packet(AVFormatContext *s, return AVERROR(EIO); /* the decoder expects chunks to be 16-bit aligned */ + if (wsvqa->vqfl_chunk_size == INT_MAX) + return AVERROR_INVALIDDATA; if (wsvqa->vqfl_chunk_size % 2 == 1) wsvqa->vqfl_chunk_size++; -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".