diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-03 00:29:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-05 17:54:24 +0200 |
commit | 43015afd7ce9055f1fa2d7648c3fcd9b7cfd7721 (patch) | |
tree | c810934b084df99a3eb2aee9d749741d70f76266 /libavcodec/mss2.c | |
parent | 8305a4509af2908d88bb623deb816fdaa8056c83 (diff) | |
download | ffmpeg-43015afd7ce9055f1fa2d7648c3fcd9b7cfd7721.tar.gz |
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/mss2.c')
-rw-r--r-- | libavcodec/mss2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 2eb366ee78..29897cea2e 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -152,6 +152,7 @@ static void arith2_init(ArithCoder *c, GetByteContext *gB) c->low = 0; c->high = 0xFFFFFF; c->value = bytestream2_get_be24(gB); + c->overread = 0; c->gbc.gB = gB; c->get_model_sym = arith2_get_model_sym; c->get_number = arith2_get_number; |