Browse Source

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>
Kees Cook 11 years ago
parent
commit
50b66dbf87
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/powerpc/xmon/nonstdio.c

+ 1 - 1
arch/powerpc/xmon/nonstdio.c

@@ -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);
 	}
 }