diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-31 14:38:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-20 15:50:15 +0100 |
commit | c54b9fc42fee613e2c4c0dae2052ff94cd15e254 (patch) | |
tree | 93d2b400617968468ecb2ff3fbfd6f6ef3735c84 /libavcodec/wmadec.c | |
parent | 7fc1baf0ca83ef06014878290339a59735603959 (diff) | |
download | ffmpeg-c54b9fc42fee613e2c4c0dae2052ff94cd15e254.tar.gz |
avcodec/wmadec: Require previous exponents for reuse
Fixes: division by zero
Fixes: 18474/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5764986962182144
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/wmadec.c')
-rw-r--r-- | libavcodec/wmadec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 78b51e5871..bb9bc8d236 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -587,6 +587,9 @@ static int wma_decode_block(WMACodecContext *s) s->exponents_bsize[ch] = bsize; } } + s->exponents_initialized = 1; + }else if (!s->exponents_initialized) { + return AVERROR_INVALIDDATA; } /* parse spectral coefficients : just RLE encoding */ |