buffer overrun fixed

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7781 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-10-10 20:54:08 +00:00
parent 46644b7779
commit f74c84e5e9
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2000-10-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSString.m: fillHole() fixed error in copying bytes.
2000-10-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSGAttributedString.m: ([-setAttributes:range:])

View file

@ -504,6 +504,7 @@ fillHole(ivars self, unsigned index, unsigned size)
NSCAssert(size > 0, @"size <= zero");
NSCAssert(index + size <= self->_count, @"index + size > length");
self->_count -= size;
#ifndef STABLE_MEMCPY
{
int i;
@ -536,8 +537,6 @@ fillHole(ivars self, unsigned index, unsigned size)
self->_contents.c + index, (self->_count - index));
}
#endif // STABLE_MEMCPY
self->_count -= size;
self->_flags.hash = 0;
}