diff options
author | Xinchen Hui <laruence@php.net> | 2011-08-09 12:16:58 +0000 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2011-08-09 12:16:58 +0000 |
commit | 0630945ac4a845d4379a63b3f1c2703cd4ddf058 (patch) | |
tree | 985a83c5209bf8f1a1f61efa13e88a779a11ba62 /ext/standard/proc_open.c | |
parent | 79aa564f8df4a72f3aeeeb2e3dc98a4fa14350dc (diff) | |
download | php-git-0630945ac4a845d4379a63b3f1c2703cd4ddf058.tar.gz |
Avoiding strcpy, strcat, sprintf usage to make static analyzer happy
Diffstat (limited to 'ext/standard/proc_open.c')
-rw-r--r-- | ext/standard/proc_open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 13b3855527..7bb003207f 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -183,8 +183,8 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent l = string_length + el_len + 1; memcpy(p, string_key, string_length); - strcat(p, "="); - strcat(p, data); + strncat(p, "=", 1); + strncat(p, data, el_len); #ifndef PHP_WIN32 *ep = p; |