diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-11-27 13:31:02 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-11-27 13:31:02 +0000 |
commit | 91bc14f430f798c6be3cb21cb5199ec56308d4f2 (patch) | |
tree | 1d0e421250b8b37650f51ad857094c637952de8c /source/lib/snprintf.c | |
parent | 1bd3235744bebefa6ba09795438400b4674c165c (diff) | |
download | samba-91bc14f430f798c6be3cb21cb5199ec56308d4f2.tar.gz samba-91bc14f430f798c6be3cb21cb5199ec56308d4f2.tar.xz samba-91bc14f430f798c6be3cb21cb5199ec56308d4f2.zip |
allow printing of NULL pointers with internal snprintf
Diffstat (limited to 'source/lib/snprintf.c')
-rw-r--r-- | source/lib/snprintf.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |