summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorBryan Chan <bryan.chan@ca.ibm.com>2016-05-04 17:24:31 +0000
committerBryan Chan <bryan.chan@ca.ibm.com>2016-05-04 17:24:31 +0000
commitc4abaefadb746b3ea695b318e892b38074ff19d7 (patch)
tree382dc36019870a66463495e6cc4f591938996307 /lldb
parent1b73e66b5dcfac87eb344401a853b1f7808d9d8b (diff)
downloadbcm5719-llvm-c4abaefadb746b3ea695b318e892b38074ff19d7.tar.gz
bcm5719-llvm-c4abaefadb746b3ea695b318e892b38074ff19d7.zip
Fix a SIGSEGV caused by dereferencing a pointer without a null check
llvm-svn: 268520
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index d1328015708..f1074921060 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -943,7 +943,7 @@ DWARFCompileUnit::IndexPrivate (DWARFCompileUnit* dwarf_cu,
// as our name. If it starts with '_', then it is ok, else compare
// the string to make sure it isn't the same and we don't end up
// with duplicate entries
- if (name != mangled_cstr && ((mangled_cstr[0] == '_') || (name && ::strcmp(name, mangled_cstr) != 0)))
+ if (name && name != mangled_cstr && ((mangled_cstr[0] == '_') || (::strcmp(name, mangled_cstr) != 0)))
{
Mangled mangled (ConstString(mangled_cstr), true);
func_fullnames.Insert (mangled.GetMangledName(), DIERef(cu_offset, die.GetOffset()));
@@ -966,7 +966,7 @@ DWARFCompileUnit::IndexPrivate (DWARFCompileUnit* dwarf_cu,
// as our name. If it starts with '_', then it is ok, else compare
// the string to make sure it isn't the same and we don't end up
// with duplicate entries
- if (name != mangled_cstr && ((mangled_cstr[0] == '_') || (::strcmp(name, mangled_cstr) != 0)))
+ if (name && name != mangled_cstr && ((mangled_cstr[0] == '_') || (::strcmp(name, mangled_cstr) != 0)))
{
Mangled mangled (ConstString(mangled_cstr), true);
func_fullnames.Insert (mangled.GetMangledName(), DIERef(cu_offset, die.GetOffset()));
OpenPOWER on IntegriCloud