diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-11-15 21:17:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-30 21:11:31 +0100 |
commit | 01439fe1e139b42fa218688c3a6be398bc809294 (patch) | |
tree | af31f85720d75d17d2ec4983b7b54698513e7bfb | |
parent | 488c2e8487e5dae6ddb27e2b75d0a9eb4155ea34 (diff) | |
download | ffmpeg-01439fe1e139b42fa218688c3a6be398bc809294.tar.gz |
avcodec/snowdec: Check for remaining bitstream in decode_blocks()
Fixes: Timeout
Fixes: 3142/clusterfuzz-testcase-5007853163118592
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 4527ec2216109867498edc3ac8a17fd879b5d017)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/snowdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index af92cb0070..df425b8cf3 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -437,6 +437,8 @@ static int decode_blocks(SnowContext *s){ for(y=0; y<h; y++){ for(x=0; x<w; x++){ + if (s->c.bytestream >= s->c.bytestream_end) + return AVERROR_INVALIDDATA; if ((res = decode_q_branch(s, 0, x, y)) < 0) return res; } |