pafdec: fix wrong check for input buffer size.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Aug 2012 23:58:41 +0000 (01:58 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 00:04:38 +0000 (02:04 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/paf.c

index 388e2a0..722ab26 100644 (file)
@@ -278,7 +278,7 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
 
         if (index + count > 256)
             return AVERROR_INVALIDDATA;
-        if (bytestream2_get_bytes_left(&c->gb) < 3 * AVPALETTE_SIZE)
+        if (bytestream2_get_bytes_left(&c->gb) < 3*count)
             return AVERROR_INVALIDDATA;
 
         out += index;