Fix bug where GSToUnicode attempted to read from a null pointer.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29651 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-02-16 12:46:50 +00:00
parent dc010099a9
commit c815ae549b
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-02-16 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/Additions/Unicode.m (GSToUnicode): Fix bug where
GSToUnicode attempted to read from a null pointer.
2010-02-15 Richard Frith-Macdonald <rfm@gnu.org>
Various reorganisation tweaks.

View file

@ -1490,7 +1490,7 @@ done:
}
}
#if !GS_WITH_GC
else if (ptr != buf && ptr != *dst)
else if (ptr != buf && (dst == 0 || ptr != *dst))
{
NSZoneFree(zone, ptr);
}