mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-24 01:11:01 +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
|
@ -1,3 +1,7 @@
|
|||
2001-10-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m: ([+stringWithCString:]) check for nul pointer.
|
||||
|
||||
2001-10-17 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.in (GNUSTEP_LDIR): Look for libobjc in
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -637,7 +637,9 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
|
|||
}
|
||||
else if ([name isEqual: @"footnote"] == YES)
|
||||
{
|
||||
NSLog(@"Element '%@' not implemented", name); // FIXME
|
||||
[buf appendString: @"<blockquote>"];
|
||||
[self outputText: children to: buf];
|
||||
[buf appendString: @"</blockquote>"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue