[lldb] Fix nullptr dereference in AppleObjCRuntimeV2
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Oct 2021 06:21:06 +0000 (23:21 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Oct 2021 06:30:31 +0000 (23:30 -0700)
commit957a5e987444d3193575d6ad8afe6c75da00d794
tree71f96dd356ba350dd50e662a9947cee95a650833
parent8189c4eee74959882f4f31c6c5f969cec5cca7eb
[lldb] Fix nullptr dereference in AppleObjCRuntimeV2

Fix a potential nullptr dereference in AppleObjCRuntimeV2 by checking
the result of GetClassInfoUtilityFunction and returning a failure if
it's null.

The DynamicClassInfoExtractor was already doign the right thing, but the
SharedCacheClassInfoExtractor was missing this check.
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp