[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1502405116-18599-1-git-send-email-kys@exchange.microsoft.com>
Date: Thu, 10 Aug 2017 15:45:15 -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, marcelo.cerri@...onical.com,
sthemmin@...rosoft.com
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>
Subject: [PATCH 1/2] Tools: hv: fix snprintf warning in kvp_daemon
From: Olaf Hering <olaf@...fle.de>
Increase buffer size so that "_{-INT_MAX}" will fit.
Spotted by the gcc7 snprintf checker.
Signed-off-by: Olaf Hering <olaf@...fle.de>
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 88b20e0..eaa3bec 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));
--
1.7.1
Powered by blists - more mailing lists