mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix possible nul pointer indirection crash.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24485 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
75b17ed3cc
commit
0fc85022d8
1 changed files with 15 additions and 4 deletions
|
@ -380,14 +380,25 @@ static void find_address (bfd *abfd, asection *section,
|
|||
if (bfd_find_nearest_line (abfd, section, info->symbols,
|
||||
address - vma, &fileName, &functionName, &line))
|
||||
{
|
||||
GSFunctionInfo *fi;
|
||||
GSFunctionInfo *fi;
|
||||
NSString *file = nil;
|
||||
NSString *func = nil;
|
||||
|
||||
if (fileName != 0)
|
||||
{
|
||||
file = [NSString stringWithCString: fileName
|
||||
encoding: [NSString defaultCStringEncoding]];
|
||||
}
|
||||
if (functionName != 0)
|
||||
{
|
||||
func = [NSString stringWithCString: functionName
|
||||
encoding: [NSString defaultCStringEncoding]];
|
||||
}
|
||||
fi = [GSFunctionInfo alloc];
|
||||
fi = [fi initWithModule: info->module
|
||||
address: info->theAddress
|
||||
file: [NSString stringWithCString: fileName
|
||||
encoding: [NSString defaultCStringEncoding]]
|
||||
function: [NSString stringWithUTF8String: functionName]
|
||||
file: file
|
||||
function: func
|
||||
line: line];
|
||||
[fi autorelease];
|
||||
info->theInfo = fi;
|
||||
|
|
Loading…
Reference in a new issue