X-Recipient: archive-cygwin@delorie.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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=H/hB3tMXsPR/WS75SNXc4ArnO07JQZ/SYTPuRV1g9pX
	5eio4p7uiD5pRzYlXSZ2yGo5YJaCYP3VH7A1/T1ob2v82TI33rRsVuUj7SZ3hh+U
	pMR+OaiNHfDyGwOdh6iyLRuNcGlbOCvVMM7mr9hErwfYP06m/UCmwSMQRFpVJLZg
	=
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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=xDdSiDGnOxk+UJVzWWufZRWiKS8=; b=Y+8ucbAVcxU9Et3Jl
	gywKthK9+ZDwN/BAYFNib+ZPgn7AwWQTNrtmKRvZNQnnEiT5LuJBhIqiC2DHUUk+
	z0Cn/+LFlZFCQl/4KQ7uLf7wc0u2fBCXD4sNgpX7Er4fPba+VzoVL6R6+FrD99GP
	GjHP4dJLg6FumJ8r3wwLbUUxdM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1
Message-ID: <51F5B2F2.9090508@cwilson.fastmail.fm>
Date: Sun, 28 Jul 2013 20:10:26 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: setup-x86_64: postinstall errors: Package bash 1, Package a2ps 2 and xinit 134
References: <CADex0xx+uY6Y8ngZ3tUsYr+KPi0t0+H+H7X-civ-iq0diuJfZw@mail.gmail.com>	<51EE0951.90007@users.sourceforge.net>	<51EEC7F2.5000402@cwilson.fastmail.fm>	<20130723184615.GK9689@calimero.vinschen.de>	<51EED4B4.7000908@cwilson.fastmail.fm>	<20130723192342.GM9689@calimero.vinschen.de>	<51EFD0EB.6030804@cwilson.fastmail.fm>	<1358868658.20130724173406@mtu-net.ru> <CADex0xynZvSvXCZ7TNFoqO-djtijKcNSvibVnYyO4KEwTftirg@mail.gmail.com> <51F59159.6050005@dronecode.org.uk>
In-Reply-To: <51F59159.6050005@dronecode.org.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

On 7/28/2013 5:47 PM, Jon TURNEY wrote:
> On 25/07/2013 05:24, Kenneth Wolcott wrote:
>>    I downloaded a fresh setup-x86_64.exe from cygwin.com and then ran
>> the update again.
>>
>>    Now I get only this postinstall error:
>>
>>    Package: xinit
>>      xinit.sh exit code 134
> I can reproduce this problem, so I had a go at investigating and fixing it.
>
> mkshortcut appears to exiting with SIGABRT in free(), which suggests some heap
> corruption, which I managed to track down after a bit of work with dmalloc.
>
> This appears to be a long standing bug, which for some reason manifests itself
> more severely on x86_64.
>
> xstrncat() does not allow for the terminating null byte in the memory
> allocation it makes.  strncat(dest, src, n) writes n+1 bytes to dest (n from
> src plus the terminating null byte, which is always appended).  So, the size
> of dest must be at least strlen(dest)+n+1.  Currently only strlen(dest)+n
> bytes are allocated.
>
> Trivial patch attached.

Thanks, Jon. I'll roll a new release of cygutils immediately for both 
x86 and x86_64.

--
Chuck



--
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

