Changes from richard and wacko.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2521 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1997-10-17 13:35:52 +00:00
parent 7a235b4935
commit ab180cbd8c
9 changed files with 163 additions and 117 deletions

View file

@ -1626,7 +1626,12 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
{
if (size != capacity)
{
void* tmp = objc_realloc(bytes, size);
void* tmp;
if (bytes)
tmp = realloc(bytes, size);
else
tmp = malloc(size);
if (tmp == 0)
[NSException raise:NSMallocException