diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 16:38:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:17 +0200 |
commit | c767fc96e712b21f39d5d29f347920562f37748b (patch) | |
tree | 612c466482465967ffbfde38886790bd25313945 | |
parent | b7a69943e8e64cd69bd118b2bda8c16d32d97122 (diff) | |
download | ffmpeg-c767fc96e712b21f39d5d29f347920562f37748b.tar.gz |
avcodec/dfa: Fix signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
Fixes: 1368/clusterfuzz-testcase-minimized-4507293276176384
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 12936a4585bc293c0f88327d6840f49e8e744b62)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/dfa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index f859d8312a..8336eab407 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -67,7 +67,8 @@ static int decode_tsw1(GetByteContext *gb, uint8_t *frame, int width, int height const uint8_t *frame_start = frame; const uint8_t *frame_end = frame + width * height; int mask = 0x10000, bitbuf = 0; - int v, count, segments; + int v, count; + unsigned segments; unsigned offset; segments = bytestream2_get_le32(gb); |