aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-03-26 01:00:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-03-26 23:25:43 +0100
commit86f73277bf014e2ce36dd2594f1e0fb8b3bd6661 (patch)
treeb2ae1b4be8ade0a9ccfbad8a468b1eea395019a3
parente849eb23432e45d0a1fda3901bb84eff0ce91282 (diff)
downloadffmpeg-86f73277bf014e2ce36dd2594f1e0fb8b3bd6661.tar.gz
avformat/westwood_vqa: Fix 2g packets
Fixes: signed integer overflow: 2147483424 * 2 cannot be represented in type 'int' Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-4576211411795968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/westwood_vqa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 954710a6f0..3a31e3f5e8 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -262,7 +262,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
break;
case SND2_TAG:
/* 2 samples/byte, 1 or 2 samples per frame depending on stereo */
- pkt->duration = (chunk_size * 2) / wsvqa->channels;
+ pkt->duration = (chunk_size * 2LL) / wsvqa->channels;
break;
}
break;