Browse Source

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 12936a4585)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.5
Michael Niedermayer 8 years ago
parent
commit
65f3fffbcf
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/dfa.c

+ 2
- 1
libavcodec/dfa.c View File

@@ -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);


Loading…
Cancel
Save