]> granicus.if.org Git - file/commitdiff
PR/593: Clement Lecigne: Fix off-by-one
authorChristos Zoulas <christos@zoulas.com>
Wed, 1 Feb 2017 12:38:12 +0000 (12:38 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 1 Feb 2017 12:38:12 +0000 (12:38 +0000)
src/cdf.c

index 68f2c18aa5b7f354854ea04868bcbc1a90d2c677..6764a42742109cf8183d16fb1486ab3ba24aaf54 100644 (file)
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -35,7 +35,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.86 2016/12/01 16:44:47 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.87 2017/02/01 12:38:12 christos Exp $")
 #endif
 
 #include <assert.h>
@@ -891,8 +891,8 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
                        DPRINTF(("Wrapped around %p < %p\n", q, p));
                        goto out;
                }
-               if (q > e) {
-                       DPRINTF(("Ran of the end %p > %p\n", q, e));
+               if (q >= e) {
+                       DPRINTF(("Ran of the end %p >= %p\n", q, e));
                        goto out;
                }
                inp[i].pi_id = CDF_GETUINT32(p, i << 1);