diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 62f35f7480b98a6662bf65a08074bce36937bcf7..4138e5414f8461a01f8355a9448d84cd355c9c14 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -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);