mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 20:07:04 +00:00
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 4527ec2216
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a6b1298a42
commit
500925587b
@ -413,6 +413,8 @@ static int decode_blocks(SnowContext *s){
|
|||||||
|
|
||||||
for(y=0; y<h; y++){
|
for(y=0; y<h; y++){
|
||||||
for(x=0; x<w; x++){
|
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)
|
if ((res = decode_q_branch(s, 0, x, y)) < 0)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user