diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-01 15:52:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-07 00:55:25 +0200 |
commit | d3c564b784147ea294c137ba939c80aaa016c99e (patch) | |
tree | 910449491aa62f088b0c4676505182a575dd693f /libavcodec/yop.c | |
parent | bb5314daba6572dee5e3fefa602de9b5b0df40d1 (diff) | |
download | ffmpeg-d3c564b784147ea294c137ba939c80aaa016c99e.tar.gz |
yopdec: check frame oddness to be within supported limits
Fixes Ticket1365
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit febc013dc5d6db1535a4f91cf02fa8089038937c)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/yop.c')
-rw-r--r-- | libavcodec/yop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/yop.c b/libavcodec/yop.c index df61426dfe..42059e1c5a 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -224,6 +224,10 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, s->low_nibble = NULL; is_odd_frame = avpkt->data[0]; + if(is_odd_frame>1){ + av_log(avctx, AV_LOG_ERROR, "frame is too odd %d\n", is_odd_frame); + return AVERROR_INVALIDDATA; + } firstcolor = s->first_color[is_odd_frame]; palette = (uint32_t *)s->frame.data[1]; |