X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 18 Aug 2008 10:11:42 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Bug in cygcheck (1.7) Message-ID: <20080818141142.GA32164@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <48A787F0 DOT 408 AT cwilson DOT fastmail DOT fm> <48A8188E DOT 4030203 AT elite-systems DOT org> <20080817165425 DOT GA3708 AT ednor DOT casa DOT cgf DOT cx> <48A85BA5 DOT 20501 AT cwilson DOT fastmail DOT fm> <48A8E552 DOT 3070803 AT cwilson DOT fastmail DOT fm> <20080818032220 DOT GA28914 AT ednor DOT casa DOT cgf DOT cx> <48A8F8A7 DOT 8080805 AT cwilson DOT fastmail DOT fm> <20080818133930 DOT GK21040 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080818133930.GK21040@calimero.vinschen.de> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mon, Aug 18, 2008 at 03:39:30PM +0200, Corinna Vinschen wrote: >So it's the FreeLibrary call which triggers the problem. What I don't >understand so far is, why it does. Does this have any effect? cgf Index: cygcheck.cc =================================================================== RCS file: /cvs/uberbaum/winsup/utils/cygcheck.cc,v retrieving revision 1.103 diff -d -u -p -r1.103 cygcheck.cc --- cygcheck.cc 17 Aug 2008 17:15:41 -0000 1.103 +++ cygcheck.cc 18 Aug 2008 14:11:15 -0000 @@ -2003,7 +2003,7 @@ void nuke (char *ev) { int n = 1 + strchr (ev, '=') - ev; - char *s = (char *) alloca (n + 1); + char *s = (char *) malloc (n + 1); memcpy (s, ev, n); s[n] = '\0'; putenv (s); @@ -2051,7 +2051,7 @@ load_cygwin (int& argc, char **&argv) } for (char **ev = envp; *ev; ev++) if (strncmp (*ev, "PATH=", 5) != 0) - putenv (*ev); + putenv (strdup (*ev)); if (path) putenv (path); } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/