summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-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