diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-25 16:52:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-25 16:52:03 +0000 |
commit | 1784c7b8860f001488d9f9431a9519a239e537e3 (patch) | |
tree | c6d1a30c0ee1c5de6f0fefcd7b11fcc6e60abe72 | |
parent | eb1a5092cedc56e09684f2bb18507cb7a80dafdb (diff) | |
download | perl-1784c7b8860f001488d9f9431a9519a239e537e3.tar.gz |
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..)
-rw-r--r-- | win32/perlhost.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index 17146016c7..3e22dba992 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); } |