From: Jarkko Hietaniemi Date: Tue, 25 Sep 2001 16:52:03 +0000 (+0000) Subject: Integrate change #12200 from maintperl; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1784c7b8860f001488d9f9431a9519a239e537e3;p=p5sagit%2Fp5-mst-13.2.git Integrate change #12200 from maintperl; on windows, virtualized environment could propagate deleted variables into children if they happen to be at the very end of the table p4raw-link: @12200 on //depot/maint-5.6/perl: a54e6844a84a87ee0c736e691b5bedbfcbccb5bd p4raw-id: //depot/perl@12201 p4raw-integrated: from //depot/maint-5.6/perl@12199 'merge in' win32/perlhost.h (@12146..) --- diff --git a/win32/perlhost.h b/win32/perlhost.h index 1714601..3e22dba 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -2269,11 +2269,12 @@ CPerlHost::CreateLocalEnvironmentStrings(VDir &vDir) while(lpLocalEnv) { // still have environment overrides to add - // so copy the strings into place - strcpy(lpStr, lpLocalEnv); - nLength = strlen(lpLocalEnv) + 1; - lpStr += nLength; - lpEnvPtr += nLength; + // so copy the strings into place if not an override + char *ptr = strchr(lpLocalEnv, '='); + if(ptr && ptr[1]) { + strcpy(lpStr, lpLocalEnv); + lpStr += strlen(lpLocalEnv) + 1; + } lpLocalEnv = GetIndex(dwEnvIndex); }