delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/26/19:28:34

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=bBCj
bc5RX/Dfm2U1JTyJYEbJxWkcbJzgqw4DGPrmpfdiWXqvhnJIbxh5EWM01pnNLa29
fkqLlKqflmaBNaWNZjxi4rBQmTSLATP1rVH7qMKaqU1MoWvwxjpQ0CdtqN+suj5Y
qTVsNkhDogsl7HETSLhbFjCO5yb7EKokog07FxM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=uTwV3VlFVH
95wbZdj0u8yAFYKOc=; b=silT5c2KnOmHhAhGYFuKZ/vbrRixTlTRtBVH4GYMbc
N1hxELLx9BhpiI/BmmnsE0Ejynks/52bZsy0zG/GjjWC7o22spNrQKH7hcGY9qJg
Mgjev8zKwa466yxJpfj4bVFZqwKSAl0CljDnAX+bFTuc5XuKjJPmmKLU99Brdq/Y
A=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Subject: Re: Updated [test]: coreutils-8.24-2
To: cygwin AT cygwin DOT com
References: <001c01d0e04c$d8ebc210$8ac34630$@bonhard.uklinux.net> <000001d0e051$965f38a0$c31da9e0$@bonhard.uklinux.net>
From: Eric Blake <eblake AT redhat DOT com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
X-Enigmail-Draft-Status: N1110
Message-ID: <55DE4B8B.6000401@redhat.com>
Date: Wed, 26 Aug 2015 17:28:11 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <000001d0e051$965f38a0$c31da9e0$@bonhard.uklinux.net>
X-IsSubscribed: yes

--f9KuPXTDNf2BFP5RcBmQEL1CBTegTwcmM
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 08/26/2015 04:50 PM, Fergus wrote:
>> .. No, you're the first to report it (so 8.24-2 has the same issue), but
>> now that I know about it, it will get fixed soon.

Spot the bugs:

int
cygwin_spelling (char const *path)
{
...
  int len;
...
  if (! path || ! *path || len > PATH_MAX)
    /* PATH will cause EINVAL or ENAMETOOLONG, treat it as non-existing.  */
    return -1;
  len =3D strlen (path);


D'oh. But this same flub of mine was also present in at least 8.23-4; so
it was the upstream churn in src/cp.c that caused the stack to be
different to the point that it now matters.

[For those keeping score, I should use size_t and not int to store
strlen() values, since it matters on 64-bit when encountering the
unlikely >2G string; and it helps to never branch on uninitialized memory]

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--f9KuPXTDNf2BFP5RcBmQEL1CBTegTwcmM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJV3kuMAAoJEKeha0olJ0NqPJwH/0dZVzPzdzA4/RVax/xbYAqB
7otFu34iCLzAy5mGb+0YzS4r/rVHRt5B6K/m4X+QGVwjMUO0WUCZGA5YNcpC1Z12
DV2L45Q/H9bFubCiW/BpGcBaaSOx9+hbqO0JgqU22OzDswP7h24yOhaGNx3Gv3Z2
r+nbzxjzRDEzpCDVv3MexbV8yEBhR+eeOVhJuCjUZxlXh+T2tUSV5PHj99YVCPl4
jy0uE+J21BVP2re8mNFamPGkE+lvKMyDO1cROcXMKsEoyvLKBloFZ/S9BItwBRk1
xTCM8nRsb9N/u4w0J2y6NF7OJHm9AYQcrmjha5+kHtzrNlwg4L0050g4pkdcAEw=
=66BH
-----END PGP SIGNATURE-----

--f9KuPXTDNf2BFP5RcBmQEL1CBTegTwcmM--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019