From 16710e7ab57598698edd782ed15ad98d827c9e07 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 14 Apr 2021 16:19:50 +0200 Subject: [PATCH] Fix possible NULL pointer deref. Some C-lib, like GLIBC, convert NULL to when printing %p, which we shouldn't rely on since others just bite the dust. Signed-off-by: Joachim Wiberg --- src/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.c b/src/plugin.c index 5fcc92fa..d0008221 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -196,7 +196,7 @@ void plugin_run_hook(hook_point_t no, void *arg) PLUGIN_ITERATOR(p, tmp) { if (p->hook[no].cb) { - _d("Calling %s hook n:o %d (arg: %p) ...", basename(p->name), no, arg); + _d("Calling %s hook n:o %d (arg: %p) ...", basename(p->name), no, arg ?: "NIL"); p->hook[no].cb(arg ? arg : p->hook[no].arg); } }