aboutsummaryrefslogtreecommitdiffstats
path: root/clang-plugin/printf_check.cc
diff options
context:
space:
mode:
Diffstat (limited to 'clang-plugin/printf_check.cc')
-rw-r--r--clang-plugin/printf_check.cc6
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");
}
-};
+}