This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup-x86_64: postinstall errors: Package bash 1, Package a2ps 2 and xinit 134


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]