summaryrefslogtreecommitdiff
path: root/libavcodec/takdec.c
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 14:38:41 +0200
commit27c20068054d8c6786833234f7b6db19f1e98362 (patch)
treec7dda8777a4756c405dc3a1962dceffabf8949d2 /libavcodec/takdec.c
parent9a6503f496ae496dd6b1f54fd5752d48435361b0 (diff)
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>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 7d3502b53c..8df73115d8 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -889,7 +889,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: