Commit 4527ec22 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c3b9bbcc
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment