diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-03 01:29:48 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-05 18:54:24 +0300 |
commit | 43015afd7ce9055f1fa2d7648c3fcd9b7cfd7721 (patch) | |
tree | c810934b084df99a3eb2aee9d749741d70f76266 /libavcodec/mss12.h | |
parent | 8305a4509af2908d88bb623deb816fdaa8056c83 (diff) |
avcodec/mss1: check for overread and forward errors
Fixes: Timeout (106sec -> 14ms)
Fixes: 15576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS1_fuzzer-5688080461201408
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mss12.h')
-rw-r--r-- | libavcodec/mss12.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mss12.h b/libavcodec/mss12.h index 45c4074652..6f68fc3db6 100644 --- a/libavcodec/mss12.h +++ b/libavcodec/mss12.h @@ -47,6 +47,8 @@ typedef struct Model { typedef struct ArithCoder { int low, high, value; + int overread; +#define MAX_OVERREAD 16 union { GetBitContext *gb; GetByteContext *gB; |