diff --git a/ChangeLog b/ChangeLog index 26f3243ae..a6698b685 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * Tools/gdomap.c: Fixes to last modifications - provided by Chris B Vetter. + * Source/NSString.m: Fix memory allocation of a unichar buffer to + correct size. 2001-05-04 Nicola Pero diff --git a/Source/NSString.m b/Source/NSString.m index 6518195cb..48c8f9fc6 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -3118,7 +3118,7 @@ handle_printf_atsign (FILE *stream, } else { - ustring = NSZoneMalloc(NSDefaultMallocZone(), length); + ustring = NSZoneMalloc(NSDefaultMallocZone(), length*sizeof(unichar)); } end = &ustring[length]; [self getCharacters: ustring];