From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D690C4332F for ; Tue, 7 Nov 2023 13:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbjKGNVA (ORCPT ); Tue, 7 Nov 2023 08:21:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbjKGNU6 (ORCPT ); Tue, 7 Nov 2023 08:20:58 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EF499E for ; Tue, 7 Nov 2023 05:20:56 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 151DEC433C7; Tue, 7 Nov 2023 13:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699363255; bh=T8KEbb0nn0nBAzcVEAmQK8Y4RIomoZBzTC17webmpPs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fLe+3mGr9NWGpDC/YSIRTp2SNa9q+U+P2PsFQ6sljo4NcvEApbxhQnDBi963yPheZ xWilV8eiAA1LaNALWmJareZB2jXR48dCbdoVdmfZEOHAO37cS7uhwbtKh3E3IGZ8Mc CE3rUPy8+IVgrM+DVwpxmOIj2TB/dIWHnwsNhdqX0OMYOnWeLuzD6C1wRIqG1z4jeY GnCb9ymkViYsl3qrzmrhemIFHHIN9kV74YVF8YvAZtI7t3T2D3MHsh+58m9hyBUDf2 6CuJovYPNjVEahfn2jh/hqiqr5LKBs8W7qcSdFzvb7eQw3xfJIxwCWxdvXuXScIVvb QlBsKp6pEL0ug== Date: Tue, 7 Nov 2023 14:23:58 +0100 From: Alejandro Colomar To: Jonny Grant Cc: linux-man Subject: Re: strncpy clarify result may not be null terminated Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="74IL1omE+cSos6bj" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org --74IL1omE+cSos6bj Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Tue, 7 Nov 2023 14:23:58 +0100 From: Alejandro Colomar To: Jonny Grant Cc: linux-man Subject: Re: strncpy clarify result may not be null terminated On Tue, Nov 07, 2023 at 11:52:44AM +0000, Jonny Grant wrote: > We see things differently, I'm on the C standard side on this one. Would = any information change your mind? It's difficult to say, but I doubt it. But let me ask you something: In what cases would you find strncpy(3) appropriate to use, and why? Maybe if I understand that it helps. Kind regards, Alex --=20 --74IL1omE+cSos6bj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmVKOm4ACgkQnowa+77/ 2zKhoA//QBfOKdN1L26podBAdwIk9VEHl8y4sICUH8FRbtf8Cq/kEuO81/RldBvk wmJyZg6ci66cJ1uSVjvqRxXzAsOutATJhqd+M36WwuY2bjDLoaqMaQbhgDq9hwRa 2J1QQRF+Pd77l2VVV2HhIbBc1F8n8SnU4sdvEO41/Z65dk7sj2rP4ft+Q1RtzQcU 6fgVciqcUcCAXkhqizoEkLhzWIsfsPVvlpG1yvEBlgLNqKEiVMgFW2+yarKGKgIb ubn2+6HvnHISlfVVXzpyteYGnDJULa8UmL/6vofOkdzyENDfP6FiJqqr90V+f/Pg H4fKd5r3C6cQOzIbWUpYlHo3o8t6Q6fHF32aTyC68qTbIvWV1dyeiFvh5VmRcGnA bqsZUU6P4MYw+AnFbL0a13xftx3WcVXP2Ke2ZBwRq8mYlLZPuAdPkGgrKCtPr6wF Xp3DgELcD9i2r17RM0M8Bg0go+/qctLUmXijrnY6XIitsaybo+smaeIr/p+B0CZ5 +hCsX8qjJZgAXbyqOqBZ4JiT0a39J8J3G4GtyAjqSk6eUqMW0oww+iQi7evoFu5+ us9hxSSMu2YBlMDKnjQ6fsk4cFwOpL1Mir4y/n+tLNoopcZwr/UAmEbccU9lf7cR 0KY+dVMOkztNzr8Bw1ksz4fgTHElZQL79/SaxIYxeHmlbjBlFkc= =Jmf8 -----END PGP SIGNATURE----- --74IL1omE+cSos6bj--