Commit 356194fc authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b946bd8e
......@@ -132,6 +132,10 @@ static void smc_decode_stream(SmcContext *s)
row_ptr, image_size);
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);
switch (opcode & 0xF0) {
......
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