diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-01 15:52:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-09 21:07:49 +0200 |
commit | 35bf5f7966768a5f01467ff721b6f98375b1a52c (patch) | |
tree | d3aca478c9a503e64ff865ffe21c1b9c1a808fdc | |
parent | 89409be50c212519f6313ad9144d7c5b17867728 (diff) | |
download | ffmpeg-35bf5f7966768a5f01467ff721b6f98375b1a52c.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>
-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 21ccabd243..bbe78bc0a7 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -225,6 +225,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]; |