[FFmpeg-cvslog] dvbsubdec: fix x/y_pos checks

JULIAN GARDNER git at videolan.org
Fri Oct 14 20:29:01 CEST 2011


ffmpeg | branch: master | JULIAN GARDNER <joolzg at btinternet.com> | Fri Oct 14 15:39:33 2011 +0200| [55f17d3175e5d0e6541ef432a88154e0210a9c10] | committer: Michael Niedermayer

dvbsubdec: fix x/y_pos checks

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55f17d3175e5d0e6541ef432a88154e0210a9c10
---

 libavcodec/dvbsubdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 29bed9a..38908ab 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -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;
         }
 



More information about the ffmpeg-cvslog mailing list