diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-02-22 08:23:17 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-02-22 08:23:17 +0000 |
commit | f027aef074cbf7d188a3631fe5e9f8c4d0dba2de (patch) | |
tree | d53f727c5f16cbc41c893f85c1fa0b1c62aacdc3 /ext/standard/basic_functions.c | |
parent | 609ecbfc37a1342c21082d19fa670d671c690c9e (diff) | |
download | php-git-f027aef074cbf7d188a3631fe5e9f8c4d0dba2de.tar.gz |
Fixed possible crash in putenv() on win32
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8d6f45005a..94a49d78a0 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4446,7 +4446,7 @@ PHP_FUNCTION(putenv) if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */ #if defined(PHP_WIN32) /* must copy previous value because MSVCRT's putenv can free the string without notice */ - pe.previous_value = estrndup(*env, 1024); + pe.previous_value = estrdup(*env); #else pe.previous_value = *env; #endif |