From 91bc14f430f798c6be3cb21cb5199ec56308d4f2 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 --- source/lib/snprintf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/lib/snprintf.c') diff --git a/source/lib/snprintf.c b/source/lib/snprintf.c index 0511a2bf146..f09a8dde071 100644 --- a/source/lib/snprintf.c +++ b/source/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