Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbdHJWqU (ORCPT ); Thu, 10 Aug 2017 18:46:20 -0400 Received: from a2nlsmtp01-04.prod.iad2.secureserver.net ([198.71.225.38]:56802 "EHLO a2nlsmtp01-04.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089AbdHJWqS (ORCPT ); Thu, 10 Aug 2017 18:46:18 -0400 x-originating-ip: 107.180.71.197 From: kys@exchange.microsoft.com To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, marcelo.cerri@canonical.com, sthemmin@microsoft.com Cc: "K. Y. Srinivasan" Subject: [PATCH 1/2] Tools: hv: fix snprintf warning in kvp_daemon Date: Thu, 10 Aug 2017 15:45:15 -0700 Message-Id: <1502405116-18599-1-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1502405089-18551-1-git-send-email-kys@exchange.microsoft.com> References: <1502405089-18551-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfAuFYJ4IQ41hR81pnKzBrWECRCu4+o02baMfKNNGEzX/FnHfmPNrrGfuJ2UFBR5sNDI+IIR3ZnYmLI4XGOEUbb9f8fRsZr00a5d2iHI9EGM1wbN7ztEq RQAcGJMmmRWJMff8Peg0bLOLOm2aTa/wiVGK1X1YrjgsuWTmFA1smY/jpeNWWQXoMkVPXqS++pOOIdRwCMj4C2C9p4XV0DySUgBkIqexULIr0gictmtJ6ta6 bnd2EGh6hupUA9mNuuGXCUgWmgE7//JPmuZV5T6A++S0oNLqJKIsrD59RjogAoakKWqzfO/gUVJrkKf/DnluJAl+IbPSvjYg4R6+7BVQ5P0KXiacdCUwJQv4 eZp+d05KQ4yu2O9jvwNPfH3EDc2cNz4tVCO/1QwEkwBraLpKd7W2GeGedXPSWnygMwyrPBI4R6WVVXP+yZkUqhiQNmAEs8CVed+JEDAkps1Q8zjeboRt5i7x U7CejtZM3ce6o6u98nqliBKWvDolILGk1VYZaCyM7iVfp1VWINspc89cnrDjBTlXk0+pilq+ct3dIlOs Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 705 Lines: 26 From: Olaf Hering Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering Signed-off-by: K. Y. Srinivasan --- 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