diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-28 19:08:06 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-28 19:26:18 +0400 |
commit | 03f82b5668aa7b7e535ef41cb792cdab37a81d5a (patch) | |
tree | ae746f3a974300a4c3e155c2f74578ca2758783c /libavcodec | |
parent | 7f8059bdfe9cdc00ccd8f8aa3bb0b4a32b6fb5bc (diff) |
yop: check for missing extradata
Fixes null ptr deref
Fixes Ticket1361
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 77a4c8b959fa9bc6bcaa42b40a0b046cdf3fec38)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/yop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/yop.c b/libavcodec/yop.c index 05abb24553..ac17297915 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -89,6 +89,11 @@ static av_cold int yop_decode_init(AVCodecContext *avctx) return -1; } + if (!avctx->extradata) { + av_log(avctx, AV_LOG_ERROR, "extradata missing\n"); + return AVERROR_INVALIDDATA; + } + avctx->pix_fmt = PIX_FMT_PAL8; avcodec_get_frame_defaults(&s->frame); |