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..)
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);
}