summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-02-22 08:23:17 +0000
committerDmitry Stogov <dmitry@php.net>2007-02-22 08:23:17 +0000
commitf027aef074cbf7d188a3631fe5e9f8c4d0dba2de (patch)
treed53f727c5f16cbc41c893f85c1fa0b1c62aacdc3 /ext/standard/basic_functions.c
parent609ecbfc37a1342c21082d19fa670d671c690c9e (diff)
downloadphp-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.c2
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