mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/smc: Check remaining input
Fixes: Timeout
Fixes: 1818/clusterfuzz-testcase-minimized-5039166473633792
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 356194fcb1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
345f296135
commit
5529a67817
@ -132,6 +132,10 @@ static void smc_decode_stream(SmcContext *s)
|
|||||||
row_ptr, image_size);
|
row_ptr, image_size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (bytestream2_get_bytes_left(&s->gb) < 1) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "input too small\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
opcode = bytestream2_get_byte(&s->gb);
|
opcode = bytestream2_get_byte(&s->gb);
|
||||||
switch (opcode & 0xF0) {
|
switch (opcode & 0xF0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user