提交 76d4c627 编写于 作者: A Andreas Cadhalpun 提交者: Luca Barbato

webp: Make sure enough bytes are available

Every chunk needs at least 8 bytes for chunk_type and chunk_size.
Prevent a possible infinite loop.

CC: libav-stable@libav.org
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 016cac75
......@@ -1362,7 +1362,7 @@ static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_INVALIDDATA;
}
while (bytestream2_get_bytes_left(&gb) > 0) {
while (bytestream2_get_bytes_left(&gb) > 8) {
char chunk_str[5] = { 0 };
chunk_type = bytestream2_get_le32(&gb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册