Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707408 > unrolled thread

[PATCH] Tools: hv: fix snprintf warning in kvp_daemon

Started byOlaf Hering <olaf@aepfle.de>
First post2017-08-09 17:20 +0200
Last post2017-08-09 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] Tools: hv: fix snprintf warning in kvp_daemon Olaf Hering <olaf@aepfle.de> - 2017-08-09 17:20 +0200

#1707408 — [PATCH] Tools: hv: fix snprintf warning in kvp_daemon

FromOlaf Hering <olaf@aepfle.de>
Date2017-08-09 17:20 +0200
Subject[PATCH] Tools: hv: fix snprintf warning in kvp_daemon
Message-ID<ucAW6-Gt-23@gated-at.bofh.it>
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));

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web