powerpc/xmon: avoid format string leaking to printk

This makes sure format strings cannot leak into printk (the string has
already been correctly processed for format arguments).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Kees Cook 2014-06-10 10:54:06 -07:00 committed by Benjamin Herrenschmidt
parent 3752e453f6
commit 50b66dbf87

View file

@ -122,7 +122,7 @@ void xmon_printf(const char *format, ...)
if (n && rc == 0) {
/* No udbg hooks, fallback to printk() - dangerous */
printk(xmon_outbuf);
printk("%s", xmon_outbuf);
}
}