Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-18 02:54:43 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-18 05:08:31 +0300
commit58ac7fb9c395ab91cb321fa4c8c9e127ce8147c3 (patch)
tree32722aff107f3a2a0fe4984d8a28cd56f3611895 /libavcodec/dfa.c
parent3e295e633c36f601fb3dbee533d7b5dfc8c77bef (diff)
avcodec/dfa: Fix: runtime error: signed integer overflow: -14202 * 196877 cannot be represented in type 'int'
Fixes: 1657/clusterfuzz-testcase-minimized-4710000079405056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dfa.c')
-rw-r--r--libavcodec/dfa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 3ea12f0511..8067ac94e5 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -250,7 +250,7 @@ static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height
segments = bytestream2_get_le16u(gb);
while ((segments & 0xC000) == 0xC000) {
unsigned skip_lines = -(int16_t)segments;
- unsigned delta = -((int16_t)segments * width);
+ int64_t delta = -((int16_t)segments * (int64_t)width);
if (frame_end - frame <= delta || y + lines + skip_lines > height)
return AVERROR_INVALIDDATA;
frame += delta;