cvs: php4 /ext/standard/ basic_functions.c
[email protected] ("Jouni Ahto")
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <cvsjah958943612@cvsserver> |
jah Sun May 21 23:13:32 2000 EDT
Modified files:
/php4/ext/standard basic_functions.c
Log:
Fix #4230. Putenv() was modifying its argument, a no-no.
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.190 php4/ext/standard/basic_functions.c:1.191
--- php4/ext/standard/basic_functions.c:1.190 Thu May 18 17:34:34 2000
+++ php4/ext/standard/basic_functions.c Sun May 21 23:13:32 2000
@@ -824,12 +824,11 @@
PLS_FETCH();
pe.putenv_string = estrndup((*str)->value.str.val,(*str)->value.str.len);
- pe.key = (*str)->value.str.val;
+ pe.key = estrndup((*str)->value.str.val, (*str)->value.str.len);
if ((p=strchr(pe.key,'='))) { /* nullify the '=' if there is one */
*p='\0';
}
pe.key_len = strlen(pe.key);
- pe.key = estrndup(pe.key,pe.key_len);
if (PG(safe_mode)) {
/* Check the protected list */