From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=gocy8vYJ; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B965E5A026F for ; Wed, 19 Mar 2025 01:42:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1742344920; bh=4V22tngV2pphtypj5BhcK8XKLw6dYooIvvn/3ib4CCw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gocy8vYJR50yuMYxzXFfDXLqboxo0iJCxzI50IJW3OBtwWhvx48Y5JLMtQw6R7eFk 2p9SKviuOsj1ypdWrW5jU12A/Wa6aK6F37nxv0kq7h5A9HKU3x+WMfo/C/xTgLpJg3 NfzKnvgRwKycClmheoDNc6WUMvNLRkye61eYMkJI1SPSMqXtz9SA12RnDynQwqKG/f 23egG8m0HJkoi9TcgweYNSes9I5nkeMNiZrP9l5qCwVBbLDBpxRgJv534CrbRJNnRM +m1ijpAcGF7TOVf8KEin05q307YpBVRoxs6jivi7i+w2G3Xga3Sf5/OfmgwfVVvYiO XcU6Ju3Y58M/g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZHVK40b6nz4xCy; Wed, 19 Mar 2025 11:42:00 +1100 (AEDT) Date: Wed, 19 Mar 2025 11:36:56 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] passt-repair: Fix build with -Werror=format-security Message-ID: References: <20250318195745.805417-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nF1gNiCncX4lGv4y" Content-Disposition: inline In-Reply-To: <20250318195745.805417-1-sbrivio@redhat.com> Message-ID-Hash: HUW7JWBT6L2POYPLTJQNDGOFBWH4T2QV X-Message-ID-Hash: HUW7JWBT6L2POYPLTJQNDGOFBWH4T2QV X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --nF1gNiCncX4lGv4y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 18, 2025 at 08:57:45PM +0100, Stefano Brivio wrote: > Fixes: 04701702471e ("passt-repair: Add directory watch") > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > Note: I just pushed this for my own sanity, as it's trivial and builds > are otherwise broken on CentOS Stream / RHEL. I'm posting for review > anyway in the unlikely case something can ever be wrong with this. Looks like a good idea. Wonder if it's a good idea to turn on -Wformat-security for upstream builds. >=20 > passt-repair.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/passt-repair.c b/passt-repair.c > index 8bb3f00..120f7aa 100644 > --- a/passt-repair.c > +++ b/passt-repair.c > @@ -150,7 +150,7 @@ int main(int argc, char **argv) > _exit(1); > } > =20 > - ret =3D snprintf(a.sun_path, sizeof(a.sun_path), path); > + ret =3D snprintf(a.sun_path, sizeof(a.sun_path), "%s", path); > inotify_dir =3D true; > } else { > ret =3D snprintf(a.sun_path, sizeof(a.sun_path), "%s", argv[1]); --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --nF1gNiCncX4lGv4y Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmfaEacACgkQzQJF27ox 2Gf08Q/+LKnuziIztQ/wYckY1xTNlt5Kq42kvz5t3fLdhw6ov68/YRknXoZHqgRY yRn2qfK2vxWLT8RHhjOLbYTRier4ZbWsa4qSXegeJxvGMkXFM5kNonntNl2tK3LL zSbMlAAHN29ZQe8JoLSahA87u6bbf8CA/bV2ZAi4G+Mc8yBGD88Q1ipeGaOAPYVk HBJoPQFJNSvHDxyrUPVqT49O1t8QS4KHtPpHqm4NM7b8qHSo1Z4UsMTM+vvSnK0E BvM/P7cO0ZY7wGl7XZc+RbziwaSVpsW6OYghw03n56dhQ6Dh21xaob+WK+A3QkXY YTkQ4GySqEh5u9R+lk2ERCzlTF96vNbPn+e/1ELnABiufQfahezAHMt7A4mVY/FT 3llzGFgt8S9pHRaZWV/hNK2gcWUoZ8yuvi9s+RDLi/fm+me62HV+ZxJd6drHaoNF woHuROii2DFSMkWJ/OrGwIuml1UWkT5LYODKiGZJBpOfOx8nDSFEwgX1nQbfQPgs EzKc+aEcVa/n0upaqfRenx1bek9wksdIX3BvLvykjFZySXILFtMFJYCSpgdGhnw+ jSI9n2W0KIdPG29aa2osy48QHCnLxnXUd5JdgO7IhHnLB0LWyW42uEBze0dJ8L6w a4ex4dm+pRSiKUO6JNCVFba00NXjesVGAH7rUOawnAu7qUW3FDE= =EJHb -----END PGP SIGNATURE----- --nF1gNiCncX4lGv4y--