diff options
author | Enrico Granata <egranata@apple.com> | 2012-09-29 00:45:53 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-09-29 00:45:53 +0000 |
commit | 60b81dff85029de1db5fbb50f6b2000632e03b73 (patch) | |
tree | 529e95e7e13820fdb6353ee435313036aff729b0 | |
parent | 00a896e7a270a9b9d3380af13d8fc98bbacb3bcc (diff) | |
download | bcm5719-llvm-60b81dff85029de1db5fbb50f6b2000632e03b73.tar.gz bcm5719-llvm-60b81dff85029de1db5fbb50f6b2000632e03b73.zip |
<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
-rw-r--r-- | lldb/source/Core/CXXFormatterFunctions.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Core/CXXFormatterFunctions.cpp b/lldb/source/Core/CXXFormatterFunctions.cpp index c98c8cba678..7cf9e37f760 100644 --- a/lldb/source/Core/CXXFormatterFunctions.cpp +++ b/lldb/source/Core/CXXFormatterFunctions.cpp @@ -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; |