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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=L01TxpLavVuHRFFcHOLAECQaEW80zzXoGRUkcPKpKUf oJSiQpXDiPhFMvpHwLm1F4YKdDThhXxp7ym942wztBDBYoNRwyw7xsfiR/JEFC2h X5VqIlkp50yeps0Brm69TS9GUejVAY1w2PinQEs8A6ALViVO4Fjw/Qf+gO4fr0FY = 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=Z5czneokVXfWY7deMInLh9HMB+8=; b=K1wYMXiNTuSro3j8p yzH1+vGqHTKwpptBuZrSHp0l39kCME0vdnP/SA4b3NXIQGXR3XEq1Y/D874DypvK zVtUadwLng3HVNi2En31qYIgaZ8O/HIf+8HZ629HMBYIAzs/deBLfb5Ho08EsK8A xR+7hVqUp3BeuqUwL9G2h61Xfk= 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 X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2 Message-ID: <5208EF91.7070504@cwilson.fastmail.fm> Date: Mon, 12 Aug 2013 10:22:09 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: The Cygwin Mailing List Subject: Re: Patch for run-1.3.0-1 core dump References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 8/10/2013 1:34 PM, foo wrote: > Whenever I execute run.exe, it generates run.exe.stackdump. > > At line 370 in run.c, run2_freeargv() tries to free newargv, and > run2_freeqrgv() expects that newargv is terminated by NULL. However, > in shifting newargv at line 253-256, it fails to shift NULL > terminator. Therefore, run2_freeargv() frees memory illegally. > The following patch is a workaround. > > --- run.c.old > +++ run.c.new > @@ -252,7 +252,7 @@ > newargv = run2_dupargv (argv); > /* discard newargv[0] and shift up */ > free (newargv[0]); > - for (newargc = 1; newargc < argc; newargc++) > + for (newargc = 1; newargv[newargc-1] != NULL; newargc++) > newargv[newargc-1] = newargv[newargc]; > newargc = argc - 1; Thanks for the bug report and the patch. I'll investigate and update the package soon. -- 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