mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: ensure null termination
This commit is contained in:
commit
2004585d03
1 changed files with 3 additions and 2 deletions
|
@ -1893,8 +1893,9 @@ static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
|
|||
int len;
|
||||
char s[64];
|
||||
char *tmp;
|
||||
strncpy(s, slist->data, 64);
|
||||
tmp = memchr(s, ':', 64);
|
||||
strncpy(s, slist->data, sizeof(s));
|
||||
s[sizeof(s)-1] = '\0';
|
||||
tmp = memchr(s, ':', sizeof(s));
|
||||
if(tmp) {
|
||||
*tmp = '\0';
|
||||
len = strlen(s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue