Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-01-30 10:00:50 +0400
committerAnton Khirnov <anton@khirnov.net>2013-02-06 13:21:52 +0400
commit06cf597c352519d2b70f293518c61b8c312f5d4f (patch)
treec59f80d24a677c9d50c50c83a3310737afebc390 /libavcodec/yop.c
parent89f11f498b9c15bc71494a11a7ec560f4adf630d (diff)
yop: check that extradata is large enough.
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec/yop.c')
-rw-r--r--libavcodec/yop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 69700bd266..be996c2bfb 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -89,6 +89,11 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
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];