From: Erik van der Kouwe Date: Mon, 4 Oct 2010 17:53:18 +0000 (+0000) Subject: make system server vprintf check for NULL X-Git-Tag: v3.2.0~793 X-Git-Url: http://zhaoyanbai.com/repos/weatherstation.js?a=commitdiff_plain;h=b0eaf0bc279aa0b5097160e1f6ce15e842e47095;p=minix.git make system server vprintf check for NULL --- diff --git a/lib/libsys/vprintf.c b/lib/libsys/vprintf.c index 4a97efe42..2749e400d 100644 --- a/lib/libsys/vprintf.c +++ b/lib/libsys/vprintf.c @@ -142,6 +142,7 @@ int vprintf(const char *fmt, va_list argp) /* A string. The other cases will join in here. */ case 's': p= va_arg(argp, char *); + if (!p) p = "(null)"; string_length: for (len= 0; p[len] != 0 && len < max; len++) {}