mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Tools: hv: fix snprintf warning in kvp_daemon
@ 2017-08-09 15:17 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2017-08-09 15:17 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger,
	open list:Hyper-V CORE AND DRIVERS, open list
  Cc: Olaf Hering

Increase buffer size so that "_{-INT_MAX}" will fit.
Spotted by the gcc7 snprintf checker.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 88b20e007c05..eaa3bec273c8 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1136,7 +1136,7 @@ static int process_ip_string(FILE *f, char *ip_string, int type)
 	int i = 0;
 	int j = 0;
 	char str[256];
-	char sub_str[10];
+	char sub_str[13];
 	int offset = 0;
 
 	memset(addr, 0, sizeof(addr));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-09 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09 15:17 [PATCH] Tools: hv: fix snprintf warning in kvp_daemon Olaf Hering

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®