git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89f11f4
)
yop: check that extradata is large enough.
author
Anton Khirnov
<anton@khirnov.net>
Wed, 30 Jan 2013 06:00:50 +0000
(07:00 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Wed, 6 Feb 2013 09:21:52 +0000
(10:21 +0100)
CC:libav-stable@libav.org
libavcodec/yop.c
patch
|
blob
|
history
diff --git
a/libavcodec/yop.c
b/libavcodec/yop.c
index
69700bd
..
be996c2
100644
(file)
--- a/
libavcodec/yop.c
+++ b/
libavcodec/yop.c
@@
-89,6
+89,11
@@
static av_cold int yop_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
return AVERROR_INVALIDDATA;
}
+ if (avctx->extradata_size < 3) {
+ av_log(avctx, AV_LOG_ERROR, "Missing or incomplete extradata.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
avctx->pix_fmt = AV_PIX_FMT_PAL8;
s->num_pal_colors = avctx->extradata[0];
avctx->pix_fmt = AV_PIX_FMT_PAL8;
s->num_pal_colors = avctx->extradata[0];