mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix nul pointer deref
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11206 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
995473179c
commit
8c09b2719d
3 changed files with 8 additions and 2 deletions
|
@ -460,7 +460,7 @@ handle_printf_atsign (FILE *stream,
|
|||
+ (id) stringWithCString: (const char*) byteString
|
||||
{
|
||||
NSString *obj;
|
||||
unsigned length = strlen(byteString);
|
||||
unsigned length = byteString ? strlen(byteString) : 0;
|
||||
|
||||
obj = [self allocWithZone: NSDefaultMallocZone()];
|
||||
obj = [obj initWithCString: byteString length: length];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue