mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
016cac75c6
commit
76d4c62734
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user