Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3769EC433FE for ; Fri, 21 Oct 2022 22:38:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7246E84EFA; Sat, 22 Oct 2022 00:38:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="lUyitLJb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4535484D78; Sat, 22 Oct 2022 00:37:58 +0200 (CEST) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9317D84EFA for ; Sat, 22 Oct 2022 00:37:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x736.google.com with SMTP id l9so435420qkk.11 for ; Fri, 21 Oct 2022 15:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QDdff8zEmoOkcTwywa08EV9bDDC+NzrrmOEMdyrIos8=; b=lUyitLJbH99iEPRHpz6HJHq9mlCA7+d2edZ6DanYVXNzAFJktfuCU9cuyf0vXeZonk orzzR8T7+vjkEuwhGwcKbsSL0/Letj//pXHqtl5nydeRiUQX3qgIydLjgbmuN+KVX452 eGsK0/8Z5KQnBAg+SReQhHS4Ekuef7KMz5B7U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QDdff8zEmoOkcTwywa08EV9bDDC+NzrrmOEMdyrIos8=; b=V+zL2DpBBggb3iBwZ/gSjjLCIv6LJiV+2an4ctMB6MSSm/8a4VhfVuxrO5GruKQC1K PBTYAT1vSPQHfiRuwibA8QZjvqVOI8oygiqUEJ26h85TcF5aexIHcQTls39SL/FGFU1f BGiuYrULzsDx+mfDsOMUZOfXaoELSmrbKGQA8UbJUcUjBcTF24apsBxWMQ6cKTQgbrpK xt1xycTSoHB9c3XyBgP0I6vSV+3kiwg5u4FXRallg0zae7rsL/5QiqTjRz/Gaz3eW9qh kGciErdf1k6+qaliDa+TtnT8j7bNiPXpzSO5IQix3JRyG9rnpUU+yDB1i3KUAXSKgrz/ ZyQg== X-Gm-Message-State: ACrzQf0Q1I6Lydxf9qE6xByPMb2aDbIL1rtWgVIa+jftI8dKKSh2QoxQ TttMc5it05trcd5Y9rfRImF2xA== X-Google-Smtp-Source: AMsMyM5PgIlagTgqpq65vGUMpEKwBeEthr9Hq40LzvtM+rq4JUw8HBPqHzgyD2BAPNutNLkSfr4HWQ== X-Received: by 2002:a05:620a:25c8:b0:6ae:be73:86c6 with SMTP id y8-20020a05620a25c800b006aebe7386c6mr14722316qko.531.1666391874207; Fri, 21 Oct 2022 15:37:54 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-54a5-60cd-d75f-79a0.res6.spectrum.com. [2603:6081:7b00:6400:54a5:60cd:d75f:79a0]) by smtp.gmail.com with ESMTPSA id q1-20020a05620a0d8100b006ec62032d3dsm10502591qkl.30.2022.10.21.15.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 15:37:53 -0700 (PDT) Date: Fri, 21 Oct 2022 18:37:51 -0400 From: Tom Rini To: Michal Suchanek Cc: u-boot@lists.denx.de, Andre Przywara , Heinrich Schuchardt , Jan Kiszka , Marek =?iso-8859-1?Q?Beh=FAn?= , Pali =?iso-8859-1?Q?Roh=E1r?= , Philippe Reynes , Sean Anderson , Simon Glass , Stefan Roese , Steven Lawrance Subject: Re: [PATCH v2 1/2] image: Fix string truncation warning Message-ID: <20221021223751.GA2470205@bill-the-cat> References: <20221013081657.16353-1-msuchanek@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <20221013081657.16353-1-msuchanek@suse.de> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 13, 2022 at 10:16:56AM +0200, Michal Suchanek wrote: > In file included from ../tools/imagetool.h:24, > from ../tools/default_image.c:16: > In function =E2=80=98image_set_name=E2=80=99, > inlined from =E2=80=98image_set_header=E2=80=99 at ../tools/default_i= mage.c:133:2: > ../include/image.h:786:9: warning: =E2=80=98strncpy=E2=80=99 specified bo= und 32 equals destination size [-Wstringop-truncation] > 786 | strncpy(image_get_name(hdr), name, IH_NMLEN); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > Signed-off-by: Michal Suchanek > Reviewed-by: Simon Glass > --- >=20 > Changes in v2: > Use __nonstring instead of suppressing the warning This breaks a ton of boards such as crs305-1g-4s in tools/kwbimage.h. --=20 Tom --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNTHzsACgkQFHw5/5Y0 tyz+/wv/Tikvnao1S1/ziHgUk3jfwN7M/Vt1vff27tVouNWZrhGp6PMtF2BwFlOG OL/hbL37VifGsgFWxa6iPreeYpIf2yR9G6brSa5i+ck114AU89anxh8Q9KTajTuS /O4mEnehHWekRMsiatPLCWJQIo3voSLW00H1GgkFroTM/+fQgpv69bWhoTyxYzF2 3K8tFWCFutnSK2xtO2Na9QdesfxsFAOh4vCRMFWG0lLqR9SstrIyZEOeroZgtwX0 7Is3MQrw62sfp2dtPqYrqhPGGmKdMGlTwOdGNH7OwuHs7aw+YZueZyUPpceL8gqi pg8MrnlE0n5iXdxeRdPknzQ7DK3hZluoaJogRDyu+DxO8qLzO+r2b3BVqGAnj2KT tyx3JNLx65TI3mCF0n5yRZczI8fR4oOtaxLfeR2pQ5BFvxr0jJHRw4qwth3wC8jL 24IfPRZyYcP7CHB/KnLfpUyNN6U0OglUNCLUYRnuLogALQ3tw+BJ+l1lJH0NnaXn tEnIJnCJ =4fu5 -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--