mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
Fix off-by-one in environ buffer printing (#75)
This commit is contained in:
parent
e15edb3330
commit
4b69d0fa2e
2
php_uv.c
2
php_uv.c
@ -5114,7 +5114,7 @@ PHP_FUNCTION(uv_spawn)
|
||||
char *tmp_env_entry;
|
||||
|
||||
tmp_env_entry = emalloc(sizeof(char) * (key->len + 2 + Z_STRLEN_P(value)));
|
||||
slprintf(tmp_env_entry, key->len + 1 + Z_STRLEN_P(value), "%s=%s", key->val, Z_STRVAL_P(value));
|
||||
slprintf(tmp_env_entry, key->len + 2 + Z_STRLEN_P(value), "%s=%s", key->val, Z_STRVAL_P(value));
|
||||
|
||||
zenv[i++] = tmp_env_entry;
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
Loading…
Reference in New Issue
Block a user