fix for overrun when searching backwards (spotted by Fred using valgrind)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36204 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2013-02-28 12:51:27 +00:00
parent 76255723f0
commit 75661de25e
4 changed files with 36 additions and 6 deletions

View file

@ -5638,7 +5638,7 @@ literalIsEqual(NXConstantString *self, id anObject)
buf[pos] = nextUTF8((const uint8_t *)nxcsptr, nxcslen, &i, &n);
}
index = stop;
while (index-- > 0)
while (index-- > start)
{
if ((*mImp)(aSet, @selector(characterIsMember:), buf[--pos]))
{