OSDN Git Service

dvbsubdec: fix x/y_pos checks
authorJULIAN GARDNER <joolzg@btinternet.com>
Fri, 14 Oct 2011 13:39:33 +0000 (15:39 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Oct 2011 18:19:59 +0000 (20:19 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dvbsubdec.c

index 29bed9a..38908ab 100644 (file)
@@ -793,8 +793,8 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
         y_pos++;
 
     while (buf < buf_end) {
-        if (x_pos > region->width || y_pos > region->height) {
-            av_log(avctx, AV_LOG_ERROR, "Invalid object location!\n");
+        if (x_pos >= region->width || y_pos >= region->height) {
+            av_log(avctx, AV_LOG_ERROR, "Invalid object location! %d-%d %d-%d %02x\n", x_pos, region->width, y_pos, region->height, *buf);
             return;
         }