<rdar://problem/12378910> Fixing a potential crasher in the data formatters where we fail to check for NULL or empty class name

llvm-svn: 164870
This commit is contained in:
Enrico Granata 2012-09-29 00:45:53 +00:00
parent 00a896e7a2
commit 60b81dff85
1 changed files with 3 additions and 0 deletions

View File

@ -487,6 +487,9 @@ lldb_private::formatters::NSStringSummaryProvider (ValueObject& valobj, Stream&
const char* class_name = descriptor->GetClassName().GetCString();
if (!class_name || !*class_name)
return false;
uint64_t info_bits_location = valobj_addr + ptr_size;
if (process_sp->GetByteOrder() != lldb::eByteOrderLittle)
info_bits_location += 3;