mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
curl: change uses of sprintf into snprintf
This commit is contained in:
parent
8c92b5f7ae
commit
7e2d47d2b8
1 changed files with 2 additions and 2 deletions
|
@ -257,7 +257,7 @@ PHP_MINFO_FUNCTION(curl)
|
|||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "cURL support", "enabled");
|
||||
php_info_print_table_row(2, "cURL Information", d->version);
|
||||
sprintf(str, "%d", d->age);
|
||||
snprintf(str, sizeof(str), "%d", d->age);
|
||||
php_info_print_table_row(2, "Age", str);
|
||||
|
||||
/* To update on each new cURL release using src/main.c in cURL sources */
|
||||
|
@ -324,7 +324,7 @@ PHP_MINFO_FUNCTION(curl)
|
|||
n = 0;
|
||||
p = (char **) d->protocols;
|
||||
while (*p != NULL) {
|
||||
n += sprintf(str + n, "%s%s", *p, *(p + 1) != NULL ? ", " : "");
|
||||
n += snprintf(str + n, sizeof(str) - n, "%s%s", *p, *(p + 1) != NULL ? ", " : "");
|
||||
p++;
|
||||
}
|
||||
php_info_print_table_row(2, "Protocols", str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue