Index: libs/libavcodec/dvbsubdec.c
===================================================================
--- libs/libavcodec/dvbsubdec.c	(revision 9772)
+++ libs/libavcodec/dvbsubdec.c	(working copy)
@@ -765,7 +765,7 @@
         y_pos++;
 
     while (buf < buf_end) {
-        if (x_pos > region->width || y_pos > region->height) {
+        if (x_pos >= region->width || y_pos >= region->height) {
             av_log(avctx, AV_LOG_ERROR, "Invalid object location!\n");
             return;
         }
