diff options
| author | Jouni Ahto <jah@php.net> | 2000-05-21 21:13:32 +0000 |
|---|---|---|
| committer | Jouni Ahto <jah@php.net> | 2000-05-21 21:13:32 +0000 |
| commit | e80b2b13fa3ff9c72ac19cc84702e0fd923c3530 (patch) | |
| tree | 791b5daaae36abf6696e1f0551103db3fa3e0a92 /ext/standard/basic_functions.c | |
| parent | c5cf13eb29569a14550a6cd55d0fc01843ea834d (diff) | |
| download | php-git-e80b2b13fa3ff9c72ac19cc84702e0fd923c3530.tar.gz | |
Fix #4230. Putenv() was modifying its argument, a no-no.
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index cdbc5bbccb..4a1aa32a0d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -824,12 +824,11 @@ PHP_FUNCTION(putenv) 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 */ |
