commit | 8b6eb7ce4f6a7124babd4d7f6f4bb4bb5f6daddf | [log] [tgz] |
---|---|---|
author | Anna Zaks <ganna@apple.com> | Mon Aug 29 20:43:37 2011 +0000 |
committer | Anna Zaks <ganna@apple.com> | Mon Aug 29 20:43:37 2011 +0000 |
tree | ebf6f7e9930ba64e04279520b35c26740f51c6be | |
parent | 5c96f862b7789594b11db74416af12e379a299b9 [diff] [blame] |
Fix: Bug 10798 - [analyzer] Crash when analyzing ICU. (A slight improvement on the previous commit.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138762 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp index 1c93902..76d9287 100644 --- a/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
@@ -203,7 +203,7 @@ // region, if that is the case, get the underlining region. if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) { R = ER->getAsArrayOffset().getRegion(); - if (!isa<SymbolicRegion>(R)) + if (!R || !isa<SymbolicRegion>(R)) return 0; } else return 0;