From cb90837b058ea1680ada46752294b992fbf542a4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 25 Apr 2026 10:17:32 -0400 Subject: UB / write "NULL" on NULL --- src/lib/core/template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/core/template.c b/src/lib/core/template.c index c72c6e5..3b6f58d 100644 --- a/src/lib/core/template.c +++ b/src/lib/core/template.c @@ -98,7 +98,7 @@ void tpl_register(char *key, char **ptr) { item->ptr = ptr; if (!replacing) { - SYSDEBUG("Registered tpl_item at index %u:\n\tkey=%s\n\tptr=%s", tpl_pool_used, item->key, *item->ptr); + SYSDEBUG("Registered tpl_item at index %u:\n\tkey=%s\n\tptr=%s", tpl_pool_used, item->key, *item->ptr ? *item->ptr : "NULL"); tpl_pool[tpl_pool_used] = item; tpl_pool_used++; } -- cgit