From nobody Mon Nov 10 14:24:09 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1556667535; cv=none; d=zoho.com; s=zohoarc; b=LGgEg9TPQiy7FbtukGeSCdRNtbNUvwg6+SCZsdwuZiY8AStmSI2SlvnZjek0Zjbkszd1HQBsKt80gPsQ0SYV5ZumMFd8KT+Q58qLFkijyNBWimZvnN+fbjQX25DQrHsaz4ISx9Z+x4HdmtQKt3oG6fm0Z7Bwjq/uT1cc6ReF0GE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556667535; h=Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/PI+FLHUDutGpLAfkQ4VDPA7/rpbi7ZyRYW0VU06X3g=; b=f4Trq7nLsgCxZYHmx5ofl54dBXHgFlhcVjFhRaPBDe5iY+B933bg9skwAi1YKFLoz03GVUHouwz9+UGP8rLAPmE7HetLQWzoQY8EG54Vb0+6yxAcaOtN84vpQMx0CdR4vqmB9I869wvmHcQKYA7bbudPAluIHAQfWCSXEZZ5ZbI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail header.i=@wdc.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556667535036368.00675142826924; Tue, 30 Apr 2019 16:38:55 -0700 (PDT) Received: from localhost ([127.0.0.1]:55174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLcKm-00034x-UO for importer@patchew.org; Tue, 30 Apr 2019 19:38:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLcGI-0007YA-SS for qemu-devel@nongnu.org; Tue, 30 Apr 2019 19:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLcGH-0000HQ-UE for qemu-devel@nongnu.org; Tue, 30 Apr 2019 19:34:10 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:16235) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLcBE-000697-3e; Tue, 30 Apr 2019 19:28:56 -0400 Received: from mail-bn3nam01lp2055.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([104.47.33.55]) by ob1.hgst.iphmx.com with ESMTP; 01 May 2019 07:28:53 +0800 Received: from DM6PR04MB4908.namprd04.prod.outlook.com (20.176.109.81) by DM6PR04MB6217.namprd04.prod.outlook.com (20.178.224.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.10; Tue, 30 Apr 2019 23:28:51 +0000 Received: from DM6PR04MB4908.namprd04.prod.outlook.com ([fe80::9ba:6028:ae27:7d2]) by DM6PR04MB4908.namprd04.prod.outlook.com ([fe80::9ba:6028:ae27:7d2%2]) with mapi id 15.20.1835.015; Tue, 30 Apr 2019 23:28:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1556666936; x=1588202936; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=/PI+FLHUDutGpLAfkQ4VDPA7/rpbi7ZyRYW0VU06X3g=; b=cfzvSwDCJlwLFi4gobJla6mqQNgvHjsuZ6z1GaSGNeIUjC89qgfdFbPn yVXbclJQImTJA3LwUYaa+dhPLO+W+cA+jcrNjt5/Oc1e/Hhkt6oIM1HZM BLzBL2BpoY6bew67NzEbM6TjgqCcgj0NchOtBsh+FEj3m/Qe64INpemWw M0uKwZWpF3qTE9RiRjNpqbVCZLijg3PVhpWBAn8wi67idaWBUNoNwR+T5 6mbm0aiqUjeuqgf9PcuEJkVzTWTYBHo6Hrbh1LLrPtM0fE+DPbGVSrr7L T8e2KUgJaFmd7II3nHb9/EaheV84BvVwmJnNCJ3R/90QEE0sOA6xno4Yz g==; X-IronPort-AV: E=Sophos;i="5.60,415,1549900800"; d="scan'208";a="107219025" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/PI+FLHUDutGpLAfkQ4VDPA7/rpbi7ZyRYW0VU06X3g=; b=mwCBR3p3cKWPbpZYyQuPJhvsTOZWIDGSFp/iViPEtQMONE370L1gPNtj2yu9G6pIOlCCCC+3V9IpXM/pittdU04bUrKws7kmgoD959coboYGq5IaHpC2S6DKKwuadMxU1gF3yvfJX7b5liTcwsVXRqQuwKYoHAAO2nj6L7eFOAs= From: Alistair Francis To: "qemu-devel@nongnu.org" Thread-Topic: [PATCH v2 4/5] linux-user/uname: Fix GCC 9 build warnings Thread-Index: AQHU/6x4Qb+c+VmCSUK/Sp9zhg519A== Date: Tue, 30 Apr 2019 23:28:51 +0000 Message-ID: <14aab381eaa678eca875d0b8bd456feb22a21bd8.1556666645.git.alistair.francis@wdc.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.21.0 x-clientproxiedby: BYAPR01CA0049.prod.exchangelabs.com (2603:10b6:a03:94::26) To DM6PR04MB4908.namprd04.prod.outlook.com (2603:10b6:5:19::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alistair.Francis@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [199.255.44.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 581cfe8c-5c07-4223-f550-08d6cdc39a59 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:DM6PR04MB6217; x-ms-traffictypediagnostic: DM6PR04MB6217: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-forefront-prvs: 00235A1EEF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(136003)(346002)(376002)(396003)(199004)(189003)(5640700003)(8936002)(6436002)(53936002)(73956011)(316002)(54906003)(14454004)(81156014)(6486002)(6916009)(81166006)(68736007)(8676002)(186003)(26005)(3846002)(66446008)(6116002)(66476007)(64756008)(7736002)(6512007)(66946007)(305945005)(102836004)(2906002)(66556008)(5660300002)(386003)(446003)(6506007)(66066001)(44832011)(2501003)(2351001)(11346002)(50226002)(478600001)(36756003)(486006)(476003)(2616005)(76176011)(4326008)(52116002)(14444005)(99286004)(71190400001)(71200400001)(256004)(118296001)(72206003)(86362001)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR04MB6217; H:DM6PR04MB4908.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Yk3TlvrK4dOt+zqBO9ylfCV6rVr9gitrHnqsu+qq+lOHBTUIdB/EbFZWH9Aa4h4p6eQUjHl5lXXoy9sp0ZODoaTYYH68TsIck3NcVDqY2jHrjbxM2bJeWV2USlTs65NV29q8cVdBfmeTz1aC2ee2ZYuZwKVlXx+EMvprvoxI0eCNIymbeTejZSNCQcnGvs8AyN6aCFxkJWGsAtghQyCeBO+cmIfwcqm/UQmWQPNZljoGvsxRjQo6Ylmfg2oIVYAgxPbZyb2R4P0RanqPeTx3vH5MIZk3k3p8YjFzUKFu3VN7l4giIvM0pWM4qdS/NIE+/kjJQ1PEy12mnaQTrJtzinq7xTVSngf7Y5IV8W4yQ6dAjEWW3j3r2jRWv2RBI/oSTHBEbhh2WaxShAobpzf98gD4OPHIjMs6wv0fgAS6vJQ= Content-Type: text/plain; charset="utf-8" Content-ID: <8DD885F69E374B48B23CF9E3994BDC7C@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 581cfe8c-5c07-4223-f550-08d6cdc39a59 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2019 23:28:51.3889 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6217 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 216.71.154.42 Subject: [Qemu-devel] [PATCH v2 4/5] linux-user/uname: Fix GCC 9 build warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "qemu-trivial@nongnu.org" , "riku.voipio@iki.fi" , "laurent@vivier.eu" , Alistair Francis , "kraxel@redhat.com" , "alistair23@gmail.com" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) Fix this warning when building with GCC9 on Fedora 30: In function =E2=80=98strncpy=E2=80=99, inlined from =E2=80=98sys_uname=E2=80=99 at /home/alistair/qemu/linux-u= ser/uname.c:94:3: /usr/include/bits/string_fortified.h:106:10: error: =E2=80=98__builtin_strn= cpy=E2=80=99 output may be truncated copying 64 bytes from a string of leng= th 64 [-Werror=3Dstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__de= st)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ Signed-off-by: Alistair Francis --- linux-user/uname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/uname.c b/linux-user/uname.c index 313b79dbad..2fc6096a5b 100644 --- a/linux-user/uname.c +++ b/linux-user/uname.c @@ -73,7 +73,7 @@ const char *cpu_to_uname_machine(void *cpu_env) #define COPY_UTSNAME_FIELD(dest, src) \ do { \ /* __NEW_UTS_LEN doesn't include terminating null */ \ - (void) strncpy((dest), (src), __NEW_UTS_LEN); \ + (void) memcpy((dest), (src), MIN(strlen(src), __NEW_UTS_LEN)); \ (dest)[__NEW_UTS_LEN] =3D '\0'; \ } while (0) =20 --=20 2.21.0