[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1478030854-5970-10-git-send-email-kys@exchange.microsoft.com>
Date: Tue, 1 Nov 2016 13:07:30 -0700
From: kys@...hange.microsoft.com
To: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
vkuznets@...hat.com, jasowang@...hat.com,
leann.ogasawara@...onical.com, sthemmin@...rosoft.com
Cc: Weibing Zhang <atheism.zhang@...il.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>
Subject: [PATCH V2 10/14] tools: hv: fix a compile warning in snprintf
From: Weibing Zhang <atheism.zhang@...il.com>
hv_kvp_daemon.c: In function .kvp_mac_to_if_name.:
hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security]
snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
^
hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security]
Signed-off-by: Weibing Zhang <atheism.zhang@...il.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
---
tools/hv/hv_kvp_daemon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index bc7adb8..bb0719b 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -702,7 +702,7 @@ void kvp_get_os_info(void)
if (dir == NULL)
return NULL;
- snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
+ snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
q = dev_id + strlen(kvp_net_dir);
while ((entry = readdir(dir)) != NULL) {
--
1.7.4.1
Powered by blists - more mailing lists