Use memmove rather than memcpy

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32145 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-13 12:56:46 +00:00
parent 314980c995
commit 8d89880ace
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2011-02-13 Philippe Roussel <p.o.roussel@free.fr>
* Source/NSPointerArray.m: replace memcpy with memmove for safety.
2011-02-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/NSObject+GNUstepBase.m:

View file

@ -281,7 +281,7 @@ static Class concreteClass = Nil;
}
if (i < _count - 1)
{
memcpy(_contents + j, _contents + i + 1,
memmove(_contents + j, _contents + i + 1,
(_count - i) * sizeof(void*));
}
_count = i = j;