From nobody Fri Apr 26 21:36:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1599898941; cv=none; d=zohomail.com; s=zohoarc; b=Bv3k7aI4UL3WmPL6Pbyr0SGq5rtsbgC88j1YGtXxiX2T6bhH1/HCqp3Vf4wHdRXmldfNKNklXH+fNr7U3b25Gy09Fb+0eSf1yt7GH3LTFLlLjWTGIRACaatp2L018FPH6E/MTWKTv+0x8+1BEGJ88Fi/4eGsgdibLvYcQbRtLGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599898941; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=HGSCbGk7jx4lBfD5wji2qjS986+o2zqTbqVziIuqktQ=; b=DyZIUqBfJtozCjzT2KBmhoJszh4uos7bNbZZgsKK8zDa6E+CA0za2HM7DIBs0SDJmOargjbvMtiwm9tYUqk89y6GS/9G4HIw2pvN6S2ezG7nQ+SHwClp2/YM/zge1yOE3y14gSysHyTpxtWuE59GIllCKUWsmqnnxKaUPoXcwZI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1599898941172621.1125607000074; Sat, 12 Sep 2020 01:22:21 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kH0mw-0007y8-5i; Sat, 12 Sep 2020 08:21:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kH0mu-0007y3-5S for xen-devel@lists.xenproject.org; Sat, 12 Sep 2020 08:21:36 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ae7c683e-2ed0-4cb0-b05f-d4a0eabf1c2b; Sat, 12 Sep 2020 08:21:35 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1C6E7AF69; Sat, 12 Sep 2020 08:21:50 +0000 (UTC) X-Inumbo-ID: ae7c683e-2ed0-4cb0-b05f-d4a0eabf1c2b X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH v2] tools/libs/stat: fix broken build Date: Sat, 12 Sep 2020 10:21:32 +0200 Message-Id: <20200912082132.21108-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Making getBridge() static triggered a build error with some gcc versions: error: 'strncpy' output may be truncated copying 15 bytes from a string of length 255 [-Werror=3Dstringop-truncation] Fix that by using a buffer with 256 bytes instead. Fixes: 6d0ec053907794 ("tools: split libxenstat into new tools/libs/stat di= rectory") Signed-off-by: Juergen Gross --- tools/libs/stat/xenstat_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/stat/xenstat_linux.c b/tools/libs/stat/xenstat_linu= x.c index 793263f2b6..4fee63e36d 100644 --- a/tools/libs/stat/xenstat_linux.c +++ b/tools/libs/stat/xenstat_linux.c @@ -264,7 +264,7 @@ int xenstat_collect_networks(xenstat_node * node) { /* Helper variables for parseNetDevLine() function defined above */ int i; - char line[512] =3D { 0 }, iface[16] =3D { 0 }, devBridge[16] =3D { 0 }, d= evNoBridge[17] =3D { 0 }; + char line[512] =3D { 0 }, iface[16] =3D { 0 }, devBridge[256] =3D { 0 }, = devNoBridge[257] =3D { 0 }; unsigned long long rxBytes, rxPackets, rxErrs, rxDrops, txBytes, txPacket= s, txErrs, txDrops; =20 struct priv_data *priv =3D get_priv_data(node->handle); --=20 2.26.2