diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-09 11:38:07 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-01-09 18:41:43 +0000 |
commit | c8a8f7dd4d91a9f7aa8b12367fa0f84e50829cc9 (patch) | |
tree | 5724eea5d0914afc1a8d01e30f432a3ec2239ed3 /clang-plugin | |
parent | 662b20a3db28e039ca9ca8d36e6a19d6030a8e12 (diff) | |
download | rspamd-c8a8f7dd4d91a9f7aa8b12367fa0f84e50829cc9.tar.gz rspamd-c8a8f7dd4d91a9f7aa8b12367fa0f84e50829cc9.zip |
[Fix] Fix null callee case in clang plugin
Diffstat (limited to 'clang-plugin')
-rw-r--r-- | clang-plugin/printf_check.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index 69174f6fb..9b4819d08 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -375,6 +375,10 @@ namespace rspamd { bool VisitCallExpr (CallExpr *E) { + if (E->getCalleeDecl () == nullptr) { + llvm::errs () << "Bad callee\n"; + return false; + } auto callee = dyn_cast<NamedDecl> (E->getCalleeDecl ()); if (callee == NULL) { llvm::errs () << "Bad callee\n"; @@ -799,4 +803,4 @@ namespace rspamd { "_GError", "%e"); } -}; +} |