delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/04/12/20:47:00

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:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=mQf7
MdQek7tL+bGpLEexx8PjJdCAvMzgH3zti1d1Corp0uLfQ5fNshSo+OsUhWx3SRW6
CmzR2c9w5kpet+uTeOmrB70q7byFtiwZ6YXKn6p9chaf28x4yh+sVPE7dESxfgyY
BvbxOWuSVX1tNhBIxGVxd0CCMPyGgNzkrNt7aKk=
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:references
:mime-version:content-type:in-reply-to; s=default; bh=r3rHlFpoLn
mSdD5zK/CJgyy0Hyk=; b=fcVn0Gdq6oVuE7p2yI1dEAjH1exopLh7nIX7OKaQ1V
RdLRzLHGiN5i3PzgrFzIy5OtJxcIc0kgc4fuZ/s/ruBQzPOvQUT8O4WDewxzW09E
kNJGeCtNx7Yh+xlHHr3thmGrz/ISZ8pGy7WuwAsLNe8/tdjLlHhKbx/J6M5AFqaX
I=
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.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:2016041
X-HELO: mars.tony.develop-help.com
Date: Wed, 13 Apr 2016 10:46:28 +1000
From: Tony Cook <tony AT develop-help DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: strxfrm() returns an incorrect value on a short buffer
Message-ID: <20160413004628.GH12445@mars.tony.develop-help.com>
References: <20160412050722 DOT GE12445 AT mars DOT tony DOT develop-help DOT com> <20160412133049 DOT GN9870 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20160412133049.GN9870@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-IsSubscribed: yes

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.
> > 
> > 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.
> 
> Thanks for the testcase.  I applied a patch
> 
>   https://sourceware.org/git/?p=newlib-cygwin.git;h=e1854211
> 
> and created new snapshots on
> 
>   https://cygwin.com/snapshots/
> 
> Please give them a try.

Thanks, fixed in snapshot 20160412.

Tony

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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