lib/vsprintf.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index bc0ac6b333dc..dabc310684bf 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -400,8 +400,14 @@ char *string(char *buf, char *end, const char *s, struct printf_spec spec) { int len, i; - if ((unsigned long)s < PAGE_SIZE) + if ((unsigned long)s < PAGE_SIZE) { + if (s) { + spec.base = 16; + spec.flags |= SPECIAL; + return number(buf, end, (unsigned long)s, spec); + } s = "(null)"; + } len = strnlen(s, spec.precision);