mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
http://llvm.org/bugs/show_bug.cgi?id=11560 lldb::SBTarget::FindFirstType crashes when passed None
Add null checks to several functions. Plus add test scenario for passing None to SBTarget.FindFirstType(None) and friends. llvm-svn: 146540
This commit is contained in:
@@ -506,6 +506,9 @@ Module::FindTypes_Impl (const SymbolContext& sc, const ConstString &name, const
|
||||
static const char*
|
||||
StripTypeName(const char* name_cstr)
|
||||
{
|
||||
// Protect against null c string.
|
||||
if (!name_cstr)
|
||||
return name_cstr;
|
||||
const char* skip_namespace = strstr(name_cstr, "::");
|
||||
const char* template_arg_char = strchr(name_cstr, '<');
|
||||
while (skip_namespace != NULL)
|
||||
|
||||
Reference in New Issue
Block a user