aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-11-25 21:39:48 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-06 15:03:15 +0100
commit36f5f748b746fd38f0f718b96c1403590fecb3cb (patch)
tree44b82bb5ee778e541110c96557bef568fc0d139d /libavcodec
parent74ef2ddbdb5ed4d6a4ffc0b7a20ba4b6fa6e14fc (diff)
downloadffmpeg-36f5f748b746fd38f0f718b96c1403590fecb3cb.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.c2
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);