From ff033d062d883e5f9e9fb08d4dbfcc1443491c21 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Nov 2001 13:31:02 +0000 Subject: allow printing of NULL pointers with internal snprintf (This used to be commit 91bc14f430f798c6be3cb21cb5199ec56308d4f2) --- source3/lib/snprintf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3') diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c index 0511a2bf14..f09a8dde07 100644 --- a/source3/lib/snprintf.c +++ b/source3/lib/snprintf.c @@ -333,6 +333,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args break; case 's': strvalue = va_arg (args, char *); + if (!strvalue) strvalue = "(NULL)"; if (max == -1) { max = strlen(strvalue); } -- cgit