delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/18/10:12:26

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 <cgf-use-the-mailinglist-please AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019