aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmalosslessdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-07 15:07:23 +0100
committerAnton Khirnov <anton@khirnov.net>2014-08-05 14:58:03 +0000
commit849b9d34c7ef70b370c53e7af3940f51cbc07d0f (patch)
tree98e17138fc88e19380fe46455b9908da35d9141a /libavcodec/wmalosslessdec.c
parent15201e256035a3e8f9d3d7b96fc327467e1a8ead (diff)
downloadffmpeg-849b9d34c7ef70b370c53e7af3940f51cbc07d0f.tar.gz
wmalosslessdec: fix mclms_coeffs* array size
Fixes corruption of context Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org Bug-Id: CVE-2014-2098 Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 6ee27d3ddf..b8a1776e59 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -129,8 +129,8 @@ typedef struct WmallDecodeCtx {
int8_t mclms_order;
int8_t mclms_scaling;
- int16_t mclms_coeffs[128];
- int16_t mclms_coeffs_cur[4];
+ int16_t mclms_coeffs[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS * 32];
+ int16_t mclms_coeffs_cur[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS];
int16_t mclms_prevvalues[WMALL_MAX_CHANNELS * 2 * 32];
int16_t mclms_updates[WMALL_MAX_CHANNELS * 2 * 32];
int mclms_recent;