aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-01 15:52:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-09 20:47:19 +0200
commit81476cf6932f10da84a0b7b2d14ad42b9d98a017 (patch)
tree6a001005d3876b518e3ef0a15da95a4b371abab1
parent3c69368e6be17f9c99767f0d3e0c078b0ea976e8 (diff)
downloadffmpeg-81476cf6932f10da84a0b7b2d14ad42b9d98a017.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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index bf8a000e14..fe52f53887 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];