]> granicus.if.org Git - clang/commit
[analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 30 Aug 2018 18:45:05 +0000 (18:45 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 30 Aug 2018 18:45:05 +0000 (18:45 +0000)
commit914b70323824c83ad9867d5d3ce4ec5f2b1231e5
tree8a19bb17098e8a8191796bed23d5371b254ed276
parent570e1344293d1cf610567b79a0930ae140a99075
[analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings.

Return value of dyn_cast_or_null should be checked before use.
Otherwise we may put a null pointer into the map as a key and eventually
crash in checkDeadSymbols.

Differential Revision: https://reviews.llvm.org/D51385

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341092 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
test/Analysis/inner-pointer.cpp