Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9be9b90 authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds
Browse files

lib/vsprintf.c: fix interaction of kasprintf() and vsnprintf() when using %pV



Otherwise, the warning at the top of vsnprintf() gets triggered by
kvasprintf()'s first invocation (with NULL buffer and zero size) of
vsnprintf().

Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 746a2a83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -898,7 +898,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
	case 'U':
		return uuid_string(buf, end, ptr, spec, fmt);
	case 'V':
		return buf + vsnprintf(buf, end - buf,
		return buf + vsnprintf(buf, end > buf ? end - buf : 0,
				       ((struct va_format *)ptr)->fmt,
				       *(((struct va_format *)ptr)->va));
	case 'K':