diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-25 21:39:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-31 19:51:57 +0100 |
commit | 25b5331a1d0412edd84f809d0230102609241b67 (patch) | |
tree | 358d8dac2ffa1f119b4a2b98c8f3f9b17bbb97b4 /libavcodec | |
parent | 525a8ee3d878b50e6e6cd70dc7c79324bfec48c6 (diff) | |
download | ffmpeg-25b5331a1d0412edd84f809d0230102609241b67.tar.gz |
avcodec/cook: Use 3 stage VLC decoding for channel_coupling
Fixes: shift exponent -1 is negative
Fixes: out of array read
Fixes: 19028/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5759766471376896
Fixes: 19037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5734106625474560
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 89fd76db71d9d4f87c51fee2a2edf99662444df7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 90b22ecca7..f7b2461a2b 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -759,7 +759,7 @@ static int decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab) for (i = 0; i < length; i++) decouple_tab[start + i] = get_vlc2(&q->gb, p->channel_coupling.table, - p->channel_coupling.bits, 2); + p->channel_coupling.bits, 3); else for (i = 0; i < length; i++) { int v = get_bits(&q->gb, p->js_vlc_bits); |