[FFmpeg-cvslog] avcodec/webp: Check for VP8X after other VP8 chunks
Michael Niedermayer
git at videolan.org
Tue May 9 20:12:18 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon May 8 14:43:01 2017 +0200| [2f2bc2e2463221dc4d02dcd8a5a0047d2cda5261] | committer: Michael Niedermayer
avcodec/webp: Check for VP8X after other VP8 chunks
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f2bc2e2463221dc4d02dcd8a5a0047d2cda5261
---
libavcodec/webp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index d21536a286..a4fd295250 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -1423,6 +1423,10 @@ static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
bytestream2_skip(&gb, chunk_size);
break;
case MKTAG('V', 'P', '8', 'X'):
+ if (s->width || s->height || *got_frame) {
+ av_log(avctx, AV_LOG_ERROR, "Canvas dimensions are already set\n");
+ return AVERROR_INVALIDDATA;
+ }
vp8x_flags = bytestream2_get_byte(&gb);
bytestream2_skip(&gb, 3);
s->width = bytestream2_get_le24(&gb) + 1;
More information about the ffmpeg-cvslog
mailing list