Commit 7b4367d9 authored by James Zern's avatar James Zern

vp9_parser: fix endless loop w/0-sized frame

treat this the same as an over-sized superframe packet to break out of
the parser loop and allow the decoder to fail.
Reviewed-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
Signed-off-by: 's avatarJames Zern <jzern@google.com>
parent b0bb1dc6
......@@ -111,12 +111,12 @@ static int parse(AVCodecParserContext *ctx,
while (n_frames--) { \
unsigned sz = rd; \
idx += a; \
if (sz > size) { \
if (sz == 0 || sz > size) { \
s->n_frames = 0; \
*out_size = size; \
*out_data = data; \
av_log(avctx, AV_LOG_ERROR, \
"Superframe packet size too big: %u > %d\n", \
"Invalid superframe packet size: %u frame size: %d\n", \
sz, size); \
return full_size; \
} \
......
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