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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Ur+sB+ZN2iSC5zyn5UR0MuCwokZbcTow8/GY3A3i7Q2mgOuqkVc7b uani0LEQD/IuUgpMtC9dNDyT3NKQI6+6pz4xRFCNKcc9E2QxcXL8blso7NbxbFdu DNr8Di1CcRzll+l6zYZ8lhBdPfIpA3yY42A1OQdIYKGfHo1pUkPZoU= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=6TN2+jLqCQEIE+NqGEXEdzcr7lo=; b=VtnrP+o+UAQvimopSbXPlwYRKlsg JQq5T3aQyvSPaQjnI/iItuapBiDJbYVBi6qqi1TzohXZIg/qnoKIEwSRfI1iw5pf 9i3gTpKcSoG7JpLw7y4agWG3RpdL5+gXLGX+xqjq/23n9R4k0QaehFmqQy+ACcKK K01G+jxyjYbznjI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-96.6 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=H*MI:sk:2016041, H*R:D*cygwin.com X-HELO: calimero.vinschen.de Date: Wed, 13 Apr 2016 10:10:31 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: strxfrm() returns an incorrect value on a short buffer Message-ID: <20160413081031.GC9784@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20160412050722 DOT GE12445 AT mars DOT tony DOT develop-help DOT com> <20160412133049 DOT GN9870 AT calimero DOT vinschen DOT de> <20160413004628 DOT GH12445 AT mars DOT tony DOT develop-help DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TiqCXmo5T1hvSQQg" Content-Disposition: inline In-Reply-To: <20160413004628.GH12445@mars.tony.develop-help.com> User-Agent: Mutt/1.5.24 (2015-08-30) --TiqCXmo5T1hvSQQg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Apr 13 10:46, Tony Cook wrote: > On Tue, Apr 12, 2016 at 03:30:49PM +0200, Corinna Vinschen wrote: > > On Apr 12 15:07, Tony Cook wrote: > > > strxfrm() returns an incorrect value if you supply an output buffer > > > and that buffer is too short for the result. > > >=20 > > > With the code following: > > > [...] > > > It appears that strxfrm() is just returning the size of the output > > > buffer on an overflow error rather than calling LCMapString() again > > > with cchDest set to zero to get the required buffer length that > > > strxfrm() is meant to return on a short buffer. > >=20 > > Thanks for the testcase. I applied a patch > >=20 > > https://sourceware.org/git/?p=3Dnewlib-cygwin.git;h=3De1854211 > >=20 > > and created new snapshots on > >=20 > > https://cygwin.com/snapshots/ > >=20 > > Please give them a try. >=20 > Thanks, fixed in snapshot 20160412. Thanks for your feedback, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --TiqCXmo5T1hvSQQg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXDf73AAoJEPU2Bp2uRE+gcFgP/jILAEd3FmmG3U//pUnIfy8t s9a2K1SC0WejBDIhwppnb4NwVHsQrZod4PF2KTBBggStlHbifC1sGJJQyUv70oqY kC/aPzUljhLcFA00CMjZqsB1iN48c+nawk414oRbrEYv7Jfk6boIesfzthGAIB4+ HcrSwSYJjxCuEHWpqDvy60NK94eTL4kXm2+xA5J8Mtwo4ncDQMu2lWI3BTlm9Vv7 HAwri1wvUJuf6WLfW9Ao33gJjZXng6aCWuGBgsZ+AjSJPisi+Q70EZeqCH3RLy3t kqZqLvTuVZRuE++Ovv7RXNqQ/o43mWLvYFNpA/zqWYpnZRfXEfoPGxSp2vnfl9c6 CmfTExIykBtykVkbmAjceSG+sI5pz4TntfJAayaRSbVRWgNMLWtewhHSazrsBK1z XB4Gf4MOmuQOUv5enlJwbKnDUJvJJ+t/b/3JA2+241NGYaZTFrrqYYT0wYlDXpTd 6VRoYalLrsk6onCS2oNesNgiRo8fHY82dHZXRq8StXhjPbPsXaurYXqdBghCzoIE YHXkifGn76A14BK3oKZsYArXJI4tFT/1HqdXLQ6SxdMG6be60A0ite4HTKFUCBYW GgnWHuhozh8kBWx1TcuB0iEK9mZbej+/Vz1Mm7rkRYv+9B+bSlQ6DEgImJPRpUF6 uHIQvk/1s12nTZKAFeSQ =q9qR -----END PGP SIGNATURE----- --TiqCXmo5T1hvSQQg--