X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-6.6 required=5.0	tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL
X-Spam-Check-By: sourceware.org
Message-ID: <5050D73D.7060106@cwilson.fastmail.fm>
Date: Wed, 12 Sep 2012 14:41:01 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
Reply-To: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: (core dumped) mkshortcut
References: <CAAcBW0xWXFgUvm4bKYW8KtDWSXX5_GbamjQNOjKWLGFoXsfDCg@mail.gmail.com>	<CA+sc5mmKdBotzCPJTu4-QTpMtKUo4aMZoGPQQLEhOJ7vwEY+9Q@mail.gmail.com>	<CAAcBW0xJ0gA7tgEWUsFOahPtFPWoOxHPPE1DBKjxoNWf0=3SHA@mail.gmail.com>	<CA+sc5mn0L_E_WvLmxU0o+3GRb_81vsF1WPPc4N9VBfY4LyyGmQ@mail.gmail.com>	<7770DC1B-52FD-4A10-81D7-8B31B0425EB6@Denis-Excoffier.org>	<CA+sc5mmWsjFK-4hg=qmEfUg=VPHrmY75+L-8PC3=4OnJJ9zsFw@mail.gmail.com> <CA+7conkkOujfd1-hQgDe9TDHLXWMy8jLHs3DpBqcRXxZH6aQTA@mail.gmail.com> <504EF556.3000500@gmail.com> <505084BC.8050706@lysator.liu.se>
In-Reply-To: <505084BC.8050706@lysator.liu.se>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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

On 9/12/2012 8:49 AM, Peter Rosin wrote:

> --- src/mkshortcut/mkshortcut.c.orig	2012-04-13 05:12:18.000000000 +0200
> +++ src/mkshortcut/mkshortcut.c	2012-09-12 14:46:02.962381900 +0200
> @@ -395,7 +395,7 @@
>  xstrncat (char **dest, const char *add, size_t n)
>  {
>    size_t len = strlen (*dest) + n;
> -  char *s = (char *) realloc (*dest, len * sizeof (char));
> +  char *s = (char *) realloc (*dest, len * sizeof (char) + 1);
>    if (!s)
>    {
>      fprintf (stderr, "%s: out of memory\n", program_name);
> 

Thanks, Peter. I'll roll a new release within the next few days.

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

