Module: libav Branch: master Commit: 76d4c62734fbb8a9f497712812f30ff5c27e787f
Author: Andreas Cadhalpun <[email protected]> Committer: Luca Barbato <[email protected]> Date: Fri Jul 3 01:14:51 2015 +0200 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: [email protected] Signed-off-by: Luca Barbato <[email protected]> --- libavcodec/webp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 62f35f7..4138e54 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); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
