[FFmpeg-cvslog] yopdec: check frame oddness to be within supported limits
Michael Niedermayer
git at videolan.org
Sat Jun 9 21:18:04 CEST 2012
ffmpeg | branch: release/0.7 | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 1 15:52:20 2012 +0200| [35bf5f7966768a5f01467ff721b6f98375b1a52c] | committer: Michael Niedermayer
yopdec: check frame oddness to be within supported limits
Fixes Ticket1365
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit febc013dc5d6db1535a4f91cf02fa8089038937c)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35bf5f7966768a5f01467ff721b6f98375b1a52c
---
libavcodec/yop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 21ccabd..bbe78bc 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];
More information about the ffmpeg-cvslog
mailing list