]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Validate the fnIdx for a file segment when doing a sanity check.
authorTom Hughes <tom@compton.nu>
Mon, 22 May 2006 11:15:47 +0000 (11:15 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 22 May 2006 11:15:47 +0000 (11:15 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5919

coregrind/m_aspacemgr/aspacemgr.c

index 0538fe62accc341ff0ffd49f59337cb354fe0b35..5d40fcdba58017f20ff0304ea69063c8c3c52085 100644 (file)
@@ -932,6 +932,8 @@ static Bool sane_NSegment ( NSegment* s )
       case SkFileC: case SkFileV:
          return 
             s->smode == SmFixed
+            && (s->fnIdx == -1 ||
+                (s->fnIdx >= 0 && s->fnIdx < segnames_used && segnames[s->fnIdx].inUse))
             && !s->isCH;
 
       case SkResvn: