summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-27 13:31:02 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-27 13:31:02 +0000
commitff033d062d883e5f9e9fb08d4dbfcc1443491c21 (patch)
treecae961849c57aa983e4becb580d32de6f0c561fb /source3
parent40203ea0fcd96c9d9fc070bb5a04977012263f22 (diff)
downloadsamba-ff033d062d883e5f9e9fb08d4dbfcc1443491c21.tar.gz
samba-ff033d062d883e5f9e9fb08d4dbfcc1443491c21.tar.bz2
samba-ff033d062d883e5f9e9fb08d4dbfcc1443491c21.zip
allow printing of NULL pointers with internal snprintf
(This used to be commit 91bc14f430f798c6be3cb21cb5199ec56308d4f2)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/snprintf.c1
1 files changed, 1 insertions, 0 deletions
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);
}