From: Christos Zoulas Date: Wed, 1 Feb 2017 12:38:12 +0000 (+0000) Subject: PR/593: Clement Lecigne: Fix off-by-one X-Git-Tag: FILE5_30~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba9a661ba4080489927a6845f4978971c94c9121;p=file PR/593: Clement Lecigne: Fix off-by-one --- diff --git a/src/cdf.c b/src/cdf.c index 38d49f71..cc202b55 100644 --- a/src/cdf.c +++ b/src/cdf.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.85 2016/10/24 18:02:17 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.86 2016/12/01 16:44:47 christos Exp $") #endif #include @@ -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);