OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
016cac7
)
webp: Make sure enough bytes are available
author
Andreas Cadhalpun
<andreas.cadhalpun@googlemail.com>
Thu, 2 Jul 2015 23:14:51 +0000
(
01:14
+0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Thu, 2 Jul 2015 23:50:09 +0000
(
01:50
+0200)
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>
libavcodec/webp.c
patch
|
blob
|
history
diff --git
a/libavcodec/webp.c
b/libavcodec/webp.c
index
62f35f7
..
4138e54
100644
(file)
--- 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);