summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-11-01 15:14:22 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-11-04 17:08:18 +0100
commit3357b68bc02d855a92656d7a474b22adb32ca1a7 (patch)
tree6d2f42d298e978bc8ce9c7b66bc71a3966cd0ede /libavcodec
parent8f6c398d44b5b40ed99ed06fa0c0bbf83524b6d7 (diff)
downloadffmpeg-streaming-3357b68bc02d855a92656d7a474b22adb32ca1a7.zip
ffmpeg-streaming-3357b68bc02d855a92656d7a474b22adb32ca1a7.tar.gz
lavc/alac: Avoid allocating huge memory blocks for malicious alac input.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index d6bd21b..93cf198 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -524,7 +524,7 @@ static int alac_set_info(ALACContext *alac)
alac->max_samples_per_frame = bytestream2_get_be32u(&gb);
if (!alac->max_samples_per_frame ||
- alac->max_samples_per_frame > INT_MAX / sizeof(int32_t)) {
+ alac->max_samples_per_frame > 4096 * 4096) {
av_log(alac->avctx, AV_LOG_ERROR,
"max samples per frame invalid: %"PRIu32"\n",
alac->max_samples_per_frame);
OpenPOWER on IntegriCloud