diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-22 21:07:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-15 22:31:13 +0200 |
commit | fe7f2a77c78281fae526268612610fccada9bc74 (patch) | |
tree | e986b37a19dec38b3f7b18955196056936b59a77 /libavcodec | |
parent | 9dfe36616ff9b27fa75142d9d4c75ccdb6f6e9ac (diff) | |
download | ffmpeg-fe7f2a77c78281fae526268612610fccada9bc74.tar.gz |
avcodec/h263dec: Check slice_ret in mspeg4 slice loop
Fixes infinite loop
Fixes: 6858/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_MSMPEG4V3_fuzzer-4681563766784000
Fixes: 6890/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-4756103142309888
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 de841fbea7655b74a9663001e01008a86c88779a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h263dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 484bf39578..eae29fa438 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -641,7 +641,7 @@ retry: slice_ret = decode_slice(s); while (s->mb_y < s->mb_height) { if (s->msmpeg4_version) { - if (s->slice_height == 0 || s->mb_x != 0 || + if (s->slice_height == 0 || s->mb_x != 0 || slice_ret < 0 || (s->mb_y % s->slice_height) != 0 || get_bits_left(&s->gb) < 0) break; } else { |