summaryrefslogtreecommitdiff
path: root/ext/standard/http_fopen_wrapper.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2011-08-09 12:16:58 +0000
committerXinchen Hui <laruence@php.net>2011-08-09 12:16:58 +0000
commit64fc565765f77cc51dead0c1e78f4dac02bcd070 (patch)
treed3f1a3de0795a44d8165ad88662091f17bed9c56 /ext/standard/http_fopen_wrapper.c
parentc109640b1af602037bad2a97ca84c2f8daeaa7f1 (diff)
downloadphp-git-64fc565765f77cc51dead0c1e78f4dac02bcd070.tar.gz
Avoiding strcpy, strcat, sprintf usage to make static analyzer happy
Diffstat (limited to 'ext/standard/http_fopen_wrapper.c')
-rw-r--r--ext/standard/http_fopen_wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 7a918d9c83..4567efc1f2 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -330,7 +330,7 @@ finish:
scratch_len = strlen(path) + 29 + Z_STRLEN_PP(tmpzval);
scratch = emalloc(scratch_len);
strlcpy(scratch, Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval) + 1);
- strcat(scratch, " ");
+ strncat(scratch, " ", 1);
}
}
}
@@ -344,7 +344,7 @@ finish:
if (!scratch) {
scratch_len = strlen(path) + 29 + protocol_version_len;
scratch = emalloc(scratch_len);
- strcpy(scratch, "GET ");
+ strncpy(scratch, "GET ", scratch_len);
}
/* Should we send the entire path in the request line, default to no. */