From: Florian Krohm Date: Tue, 24 Feb 2015 11:23:51 +0000 (+0000) Subject: Fix an off-by-one error - this time, do it right. X-Git-Tag: svn/VALGRIND_3_11_0~635 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1b0a8e30d9d452437682ee0851ef44d399ef8b9;p=thirdparty%2Fvalgrind.git Fix an off-by-one error - this time, do it right. A segment with start == end is not empty. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14957 --- diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index 25f304958b..41fb3e43e8 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -685,7 +685,7 @@ static Bool sane_NSegment ( const NSegment* s ) if (s == NULL) return False; /* No zero sized segments and no wraparounds. */ - if (s->start >= s->end) return False; + if (s->start > s->end) return False; /* require page alignment */ if (!VG_IS_PAGE_ALIGNED(s->start)) return False;