From: Stanislav Fomichev <sdf@google.com>
To: netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net,
Stanislav Fomichev <sdf@google.com>
Subject: [PATCH bpf-next 2/4] selftests: bpf: fix -Wformat-security warning for flow_dissector_load.c
Date: Tue, 2 Apr 2019 10:08:33 -0700 [thread overview]
Message-ID: <20190402170835.30732-3-sdf@google.com> (raw)
In-Reply-To: <20190402170835.30732-1-sdf@google.com>
flow_dissector_load.c:55:19: warning: format string is not a string literal (potentially insecure)
[-Wformat-security]
error(1, errno, command);
^~~~~~~
flow_dissector_load.c:55:19: note: treat the string as an argument to avoid this
error(1, errno, command);
^
"%s",
1 warning generated.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
tools/testing/selftests/bpf/flow_dissector_load.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/flow_dissector_load.c b/tools/testing/selftests/bpf/flow_dissector_load.c
index 77cafa66d048..7136ab9ffa73 100644
--- a/tools/testing/selftests/bpf/flow_dissector_load.c
+++ b/tools/testing/selftests/bpf/flow_dissector_load.c
@@ -52,7 +52,7 @@ static void detach_program(void)
sprintf(command, "rm -r %s", cfg_pin_path);
ret = system(command);
if (ret)
- error(1, errno, command);
+ error(1, errno, "%s", command);
}
static void parse_opts(int argc, char **argv)
--
2.21.0.392.gf8f6787159e-goog
next prev parent reply other threads:[~2019-04-02 17:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 17:08 [PATCH bpf-next 0/4] selftests: bpf: support building selftests with clang and fix warnings Stanislav Fomichev
2019-04-02 17:08 ` [PATCH bpf-next 1/4] selftests: bpf: tests.h should depend on .c files, not the output Stanislav Fomichev
2019-04-02 17:08 ` Stanislav Fomichev [this message]
2019-04-02 17:08 ` [PATCH bpf-next 3/4] selftests: bpf: fix -Wformat-invalid-specifier for bpf_obj_id.c Stanislav Fomichev
2019-04-02 17:08 ` [PATCH bpf-next 4/4] selftests: bpf: remove duplicate .flags initialization in ctx_skb.c Stanislav Fomichev
2019-04-02 21:19 ` [PATCH bpf-next 0/4] selftests: bpf: support building selftests with clang and fix warnings Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190402170835.30732-3-sdf@google.com \
--to=sdf@google.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).