summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-12-20 23:07:12 +0000
committerSean Callanan <scallanan@apple.com>2013-12-20 23:07:12 +0000
commitfd1ca95331d9039a28a4fb868f0332899b38a13a (patch)
treea2c433c5944ee102d6ef92b80d3995c65ef6482a
parent556b3d69c02f9f4c27f375db7cb0002c7e800d73 (diff)
downloadbcm5719-llvm-fd1ca95331d9039a28a4fb868f0332899b38a13a.tar.gz
bcm5719-llvm-fd1ca95331d9039a28a4fb868f0332899b38a13a.zip
Harden the Objective-C runtime against weird method
signatures. <rdar://problem/15631996> llvm-svn: 197843
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
index 5a5fb464978..9ddd2ac3d38 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
@@ -528,6 +528,9 @@ AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
auto instance_method_func = [log, interface_decl, this](const char *name, const char *types) -> bool
{
+ if (!name || !types)
+ return false; // skip this one
+
ObjCRuntimeMethodType method_type(types);
clang::ObjCMethodDecl *method_decl = method_type.BuildMethod (interface_decl, name, true);
@@ -543,6 +546,9 @@ AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
auto class_method_func = [log, interface_decl, this](const char *name, const char *types) -> bool
{
+ if (!name || !types)
+ return false; // skip this one
+
ObjCRuntimeMethodType method_type(types);
clang::ObjCMethodDecl *method_decl = method_type.BuildMethod (interface_decl, name, false);
OpenPOWER on IntegriCloud