aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-18 14:37:19 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-18 16:05:23 +0200
commit8a38efad428f9e8bdea69c0a8d706ffb1de87ad5 (patch)
tree8a2fc683752b97f8a629dc6cc0d19ff4811ccb24
parent575ba21007872ef481b6fe54142fe4f476fb72c4 (diff)
downloadffmpeg-8a38efad428f9e8bdea69c0a8d706ffb1de87ad5.tar.gz
avcodec/takdec: Fixes: integer overflow in AV_SAMPLE_FMT_U8P output
Fixes: runtime error: signed integer overflow: 2147483543 + 128 cannot be represented in type 'int' Fixes: 2234/clusterfuzz-testcase-minimized-6266896041115648 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 27c20068054d8c6786833234f7b6db19f1e98362) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 66983d67c9..cc5623e0ca 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -887,7 +887,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
uint8_t *samples = (uint8_t *)frame->extended_data[chan];
int32_t *decoded = s->decoded[chan];
for (i = 0; i < s->nb_samples; i++)
- samples[i] = decoded[i] + 0x80;
+ samples[i] = decoded[i] + 0x80U;
}
break;
case AV_SAMPLE_FMT_S16P: