Browse Source

avcodec/dpcm: Fix integer overflow in AV_CODEC_ID_GREMLIN_DPCM

Fixes: signed integer overflow: -2147479324 + -32568 cannot be represented in type 'int'
Fixes: 20103/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GREMLIN_DPCM_fuzzer-5667667579240448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b1aecad9ea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4.8
Michael Niedermayer 6 years ago
parent
commit
e4921f409d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/dpcm.c

+ 1
- 1
libavcodec/dpcm.c View File

@@ -367,7 +367,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
while (output_samples < samples_end) {
uint8_t n = bytestream2_get_byteu(&gb);

*output_samples++ = s->sample[idx] += s->array[n];
*output_samples++ = s->sample[idx] += (unsigned)s->array[n];
idx ^= 1;
}
}


Loading…
Cancel
Save