Browse Source

yopdec: check frame oddness to be within supported limits

Fixes Ticket1365

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit febc013dc5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11.1
Michael Niedermayer 13 years ago
parent
commit
d3c564b784
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/yop.c

+ 4
- 0
libavcodec/yop.c View File

@@ -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];



Loading…
Cancel
Save