[FFmpeg-cvslog] avcodec/takdec: Fixes: integer overflow in AV_SAMPLE_FMT_U8P output
Michael Niedermayer
git at videolan.org
Sun Jul 30 00:33:20 EEST 2017
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jun 18 14:37:19 2017 +0200| [e5d9f0c3cd05079118c17a34b743ac0ebfca3389] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 27c20068054d8c6786833234f7b6db19f1e98362)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e5d9f0c3cd05079118c17a34b743ac0ebfca3389
---
libavcodec/takdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 8a5347a355..f25cd7a031 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:
More information about the ffmpeg-cvslog
mailing list