[FFmpeg-cvslog] r25797 - trunk/libavcodec/pgssubdec.c
reimar
subversion
Mon Nov 22 21:39:18 CET 2010
Author: reimar
Date: Mon Nov 22 21:39:18 2010
New Revision: 25797
Log:
Fail RLE decoding if insufficient data for a complete bitmap was decoded.
Modified:
trunk/libavcodec/pgssubdec.c
Modified: trunk/libavcodec/pgssubdec.c
==============================================================================
--- trunk/libavcodec/pgssubdec.c Mon Nov 22 21:35:07 2010 (r25796)
+++ trunk/libavcodec/pgssubdec.c Mon Nov 22 21:39:18 2010 (r25797)
@@ -136,6 +136,11 @@ static int decode_rle(AVCodecContext *av
}
}
+ if (pixel_count < sub->rects[0]->w * sub->rects[0]->h) {
+ av_log(avctx, AV_LOG_ERROR, "Insufficient RLE data for subtitle\n");
+ return -1;
+ }
+
dprintf(avctx, "Pixel Count = %d, Area = %d\n", pixel_count, sub->rects[0]->w * sub->rects[0]->h);
return 0;
More information about the ffmpeg-cvslog
mailing list