Skip to contentSkip to conversation

Tools: hv: fix snprintf warning in kvp_daemon

PATCH New Olaf Hering 1 participant 1 message Aug 9, 2017 Hyper-V/Azure core and drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Tools: hv: fix snprintf warning in kvp_daemon

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

---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hv/hv_kvp_daemon.c +1 -1
index 88b20e007c05..eaa3bec273c8 100644
@@ -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));