summaryrefslogtreecommitdiffstats
path: root/libavcodec/dirac_arith.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-01-08 23:40:54 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-16 01:29:18 +0100
commit51978aefe8074cc3e020994f6b329387b2149cb8 (patch)
treeec3a46f11b40d0a1f868079c3c899ef1b6e2792b /libavcodec/dirac_arith.c
parent6ed3d0e01c20aba7ef3984c0b8965d26e9f4990c (diff)
downloadffmpeg-streaming-51978aefe8074cc3e020994f6b329387b2149cb8.zip
ffmpeg-streaming-51978aefe8074cc3e020994f6b329387b2149cb8.tar.gz
avcodec/dirac_arith: Treat overread as error
Fixes: Timeout Fixes: 11663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016 Before:Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016 in 26006 ms After: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016 in 106 ms 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/dirac_arith.c')
-rw-r--r--libavcodec/dirac_arith.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/dirac_arith.c b/libavcodec/dirac_arith.c
index 1e6b964..36142fe 100644
--- a/libavcodec/dirac_arith.c
+++ b/libavcodec/dirac_arith.c
@@ -116,6 +116,7 @@ void ff_dirac_init_arith_decoder(DiracArith *c, GetBitContext *gb, int length)
c->counter = -16;
c->range = 0xffff;
c->error = 0;
+ c->overread= 0;
for (i = 0; i < DIRAC_CTX_COUNT; i++)
c->contexts[i] = 0x8000;
OpenPOWER on IntegriCloud