From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 37B3A3858D20 for ; Wed, 5 Apr 2023 12:30:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37B3A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x331.google.com with SMTP id p34so20780705wms.3 for ; Wed, 05 Apr 2023 05:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680697842; x=1683289842; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=MMdOr+6RuIDFeDZVcC5ubqp9IPcMSpxAQGZoWHBSkhw=; b=DjU8nw7pG9vCdvoHOcSdgZEfpmKtBeqoWWwMeIg0lqr7wcrUg/pSpFAfNrH4QkTL46 1JLUsne3aQABOxppOAF7xjZXzeakXYjY0rPxPYslUIJWoksjm+qW0YqWgFZluuuXoDcQ yz0qJTO934JrHyK3WB8tph1bu5AC2C3/c3JoJ+HIoucWE4OkrBuALRuTvVHS4z4bJTvU /3KoF0Tk97Yqo7rDs/e974u8NOW+ENB6dqtXskFqyMc98H8MQXixlcQqOKBgplYkt9Q6 AZ0pxATKRf0XMziv1k8rCfHx9q0hw2cwLTOfGHTQ56vBl0KCWLINdGyk3ZjR4aAfUWvD f+Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680697842; x=1683289842; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=MMdOr+6RuIDFeDZVcC5ubqp9IPcMSpxAQGZoWHBSkhw=; b=kG055GexCsVsZiJtK77oW8jL4IhbRLLEuyWLrtaVDH8AKoRL7s+nR0kJM+RFAKB3NG npWEFdtWKclanfkcUOp3vyti+TVfs32Xqkfkot62AO3LbbT6LHSQYkMKHyPUSIKCv4XR xz409TKHl/MqSIDYd3j//+sOpKT4XWCTXduo7YNYSLkLA91lpXU5nLHjnkL0oqHHXGJe AqDeegDYU963pJBwtaTVox/K4ww3bmwhvXRMJzS4j1W1iWA6RuFn+k1em476T9ByLrxf VHfur1jAo1sFPheq+3va2x2Gf5v6tCd4aDweOq8DjCOYfBr1XM/O6t6rZGd07ADg5R2E MgHw== X-Gm-Message-State: AAQBX9cySrtX1yDq4NYlog9aVb43t5e2sQSX3/YhgOMRXsmhtJPzd6ry GYk7ywIClYYisiexiJJCwxM= X-Google-Smtp-Source: AKy350ZoxolmvScVB+OqQYuMKzRy/9Hg7oUjmDbLaq4qKzfKtJxTkTnTTK3QxjgcYnMOgIiVCX3Z9Q== X-Received: by 2002:a05:600c:19c9:b0:3e1:e149:b67b with SMTP id u9-20020a05600c19c900b003e1e149b67bmr1686132wmq.18.1680697841536; Wed, 05 Apr 2023 05:30:41 -0700 (PDT) Received: from [192.168.0.160] ([170.253.51.134]) by smtp.gmail.com with ESMTPSA id h9-20020a1ccc09000000b003ed1ff06faasm2075510wmb.19.2023.04.05.05.30.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 05:30:40 -0700 (PDT) Message-ID: Date: Wed, 5 Apr 2023 14:30:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 0/2] strlcpy/strlcat/wcslcpy/wcscat implementation To: Florian Weimer , libc-alpha@sourceware.org Cc: Paul Eggert References: Content-Language: en-US From: Alejandro Colomar In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------yQLJZK3pcarHO73Giuz0cOoK" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------yQLJZK3pcarHO73Giuz0cOoK Content-Type: multipart/mixed; boundary="------------sMoC2yNc9uaDQLIilpaqp2rE"; protected-headers="v1" From: Alejandro Colomar To: Florian Weimer , libc-alpha@sourceware.org Cc: Paul Eggert Message-ID: Subject: Re: [PATCH 0/2] strlcpy/strlcat/wcslcpy/wcscat implementation References: In-Reply-To: --------------sMoC2yNc9uaDQLIilpaqp2rE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Florian, On 4/5/23 13:20, Florian Weimer via Libc-alpha wrote: > These two patches add support for four functions planned for addition t= o > POSIX, plus their fortified variants. They are available with > _DEFAULT_SOURCE because the BSDs expose them by default, oto. >=20 > Tested on i686-linux-gnu and x86_64-linux-gnu. Built with > build-many-glibcs.py (on all ABIs, but not all targets because disk > space is no longer sufficient on the lab machines I have access to). >=20 > Paul, the Austin Groups issue you raised has been closed. Do you keep > your sustained objection to adding these functions to glibc? Just adding a data point about this: In shadow, we improved existing code going from strncpy(3) to strlcpy(3).= See . In some cases, as corretly pointed out by Paul, we could futher improve some cases by just calling strcpy(3). However, in some others, strlcpy(3) was the sanest API, and while we could check prior to strcpy(3)/memcpy(3) with strlen(3), that was unnecessarily cluttering the code. See . So I like the idea of adding this API to glibc. In fact, it would reduce the need for libbsd in some packages like shadow (although we still need it for readpassphrase(3)). Cheers, Alex >=20 > Thanks, > Florian >=20 > Florian Weimer (2): > Implement strlcpy and strlcat [BZ #178] > Add the wcslcpy, wcslcat functions > --=20 GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5 --------------sMoC2yNc9uaDQLIilpaqp2rE-- --------------yQLJZK3pcarHO73Giuz0cOoK Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmQtaekACgkQnowa+77/ 2zIAbA//YXow1x5sznafEHUzi1Ed/YVjTBz+hkDVru8RO5L+PWc8tUPzcqZ8KD4g lK5tZyY6gCcyVUITpkLqYUFz4ZMleU0TCUtrJyzJLXN8fR2agTU5KOF6Acrt2aJ9 nWd57C07CR7s0wwR1e6zEmyyPtAPUCsFU9Vr256mHDPtZ1X8rYBlyJkQVT1lGggP 5SJIoy9SR+voE/G1YVPArt25kTE0MantzWV8yp0qy+i6EYyBm8KGjCrE8VoC5jRx HAO7llLcpeJ2nZ/PdSyTbteuwVjZEY1BGhx3osEhXuhAbPIkdDJs3mh8Ad1oDxAP ufiNTGz/uAYPBrgFIay1Xf30dteeP9z0LG+o2WZV2/2/7D9466NMJCnDm1nhHifT ljdK2M0hL0g3KvnXxFRqLNcXuPMmox3tN0aTNEjwhQ1h+RtpXxOlyuWAESkWL9mB 68SxR2YBXR59Y076gwlKun7FSgrllMefm5oeTI7GAcT9yYfrc4BRGg4XBzX89HUX 2ovG9KBI3Dm3HpoRavB+2f9d2ff61GRus5xlzdPhj15x16i4sbrXlGo/2+t7KynU Mn9DcyfMR+1Xvln2xKUG/fPDAYkIMjI9pIa5/CuueorQk/RAVcXqvz+uXhDlyrGI IaWv9zqza2kJpjuuTohQqyAQf/hmp2UjGRVqRlcPXwFV3obJgF8= =CouD -----END PGP SIGNATURE----- --------------yQLJZK3pcarHO73Giuz0cOoK--