mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts: recordmcount: fix incorrect use of sprintf
@ 2015-12-30 23:06 Colin King
  2016-01-04 15:42 ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2015-12-30 23:06 UTC (permalink / raw)
  To: Steven Rostedt, Li Bin, Russell King, Will Deacon; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Fix build warning:

scripts/recordmcount.c:589:4: warning: format not a string
literal and no format arguments [-Wformat-security]
    sprintf("%s: failed\n", file);

Fixes: a50bd43935586 ("ftrace/scripts: Have recordmcount copy the object file")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 scripts/recordmcount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index 301d70b..e1675927 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -586,7 +586,7 @@ main(int argc, char *argv[])
 			do_file(file);
 			break;
 		case SJ_FAIL:    /* error in do_file or below */
-			sprintf("%s: failed\n", file);
+			fprintf(stderr, "%s: failed\n", file);
 			++n_error;
 			break;
 		case SJ_SUCCEED:    /* premature success */
-- 
2.6.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-06 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 23:06 [PATCH] scripts: recordmcount: fix incorrect use of sprintf Colin King
2016-01-04 15:42 ` Steven Rostedt
2016-01-06 11:28   ` Fengguang Wu
2016-01-06 23:13     ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®