[FFmpeg-cvslog] pafdec: fix wrong palette index check.
Michael Niedermayer
git at videolan.org
Wed Aug 15 02:09:08 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 15 01:57:45 2012 +0200| [456f0c6477925611f1b45a434795f8bad4fb2a66] | committer: Michael Niedermayer
pafdec: fix wrong palette index check.
Fixes Ticket1641
Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=456f0c6477925611f1b45a434795f8bad4fb2a66
---
libavcodec/paf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/paf.c b/libavcodec/paf.c
index 1c3e8b8..388e2a0 100644
--- a/libavcodec/paf.c
+++ b/libavcodec/paf.c
@@ -276,7 +276,7 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
index = bytestream2_get_byte(&c->gb);
count = bytestream2_get_byte(&c->gb) + 1;
- if (index + count > AVPALETTE_SIZE)
+ if (index + count > 256)
return AVERROR_INVALIDDATA;
if (bytestream2_get_bytes_left(&c->gb) < 3 * AVPALETTE_SIZE)
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list