diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index a5458cac8ecfebdcb7a471485229913ab6f8e7dd..8ada456b8146f1f47cc63d4b4ab7b0420c5e6dca 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -269,8 +269,8 @@ static int cinepak_decode_strip (CinepakContext *s,
     int      chunk_id, chunk_size;
 
     /* coordinate sanity checks */
-    if (strip->x1 >= s->width  || strip->x2 > s->width  ||
-        strip->y1 >= s->height || strip->y2 > s->height ||
+    if (strip->x2 > s->width  ||
+        strip->y2 > s->height ||
         strip->x1 >= strip->x2 || strip->y1 >= strip->y2)
         return -1;