[PATCH 2/2] commands: dmesg: fi format security warning

Marc Kleine-Budde mkl at pengutronix.de
Tue Mar 31 09:14:55 PDT 2015


commands/dmesg.c: In function ‘do_dmesg’:
commands/dmesg.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security]

Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 commands/dmesg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/dmesg.c b/commands/dmesg.c
index b2bb334e24bf..510bc16594d1 100644
--- a/commands/dmesg.c
+++ b/commands/dmesg.c
@@ -68,7 +68,7 @@ static int do_dmesg(int argc, char *argv[])
 		*(buf + len) = '\n';
 		*(buf + len + 1) = 0;
 
-		pr_info(buf);
+		pr_info("%s", buf);
 
 		free(buf);
 
-- 
2.1.4




More information about the barebox mailing list