mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* v4.4-rc8: compile warning in scripts/recordmcount.c
@ 2016-01-04 20:22 Petri Gynther
  2016-01-04 20:52 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Petri Gynther @ 2016-01-04 20:22 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

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

Introduced by commit:
commit a50bd43935586420fb75f4558369eb08566fac5e
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Tue Dec 15 16:06:10 2015 -0500

    ftrace/scripts: Have recordmcount copy the object file


Should that sprintf() be converted to fprintf(stderr, ...) instead?

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

* Re: v4.4-rc8: compile warning in scripts/recordmcount.c
  2016-01-04 20:22 v4.4-rc8: compile warning in scripts/recordmcount.c Petri Gynther
@ 2016-01-04 20:52 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2016-01-04 20:52 UTC (permalink / raw)
  To: Petri Gynther; +Cc: linux-kernel

On Mon, 4 Jan 2016 12:22:58 -0800
Petri Gynther <pgynther@google.com> wrote:

> vmlinux: scripts/recordmcount.c: In function ‘main’:
> vmlinux: scripts/recordmcount.c:589:4: warning: format not a string
> literal and no format arguments [-Wformat-security]
> vmlinux:     sprintf("%s: failed\n", file);
> 
> Introduced by commit:
> commit a50bd43935586420fb75f4558369eb08566fac5e
> Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
> Date:   Tue Dec 15 16:06:10 2015 -0500
> 
>     ftrace/scripts: Have recordmcount copy the object file
> 
> 
> Should that sprintf() be converted to fprintf(stderr, ...) instead?

I'm currently testing this patch:

http://lkml.kernel.org/r/1451516801-16951-1-git-send-email-colin.king@canonical.com

Seems my older gcc (and Fengguang Wu's gcc for his test box) doesn't
catch this.

-- Steve

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

end of thread, other threads:[~2016-01-04 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 20:22 v4.4-rc8: compile warning in scripts/recordmcount.c Petri Gynther
2016-01-04 20:52 ` Steven Rostedt

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®