diff options
author | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2007-02-24 02:17:47 +0000 |
commit | 50ea26760da4e0fcf4980e739e1d0ed520de8d59 (patch) | |
tree | 888a32ce58864f5318a7f1072f8526c6a99212f9 /sapi/apache/php_apache.c | |
parent | 3e262bd36989898ac01224f0a987e79f44d25b31 (diff) | |
download | php-git-50ea26760da4e0fcf4980e739e1d0ed520de8d59.tar.gz |
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
Diffstat (limited to 'sapi/apache/php_apache.c')
-rw-r--r-- | sapi/apache/php_apache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 98a85a5a07..99d338f151 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -207,20 +207,20 @@ PHP_MINFO_FUNCTION(apache) } #ifdef APACHE_RELEASE - sprintf(output_buf, "%d", APACHE_RELEASE); + snprintf(output_buf, sizeof(output_buf), "%d", APACHE_RELEASE); php_info_print_table_row(2, "Apache Release", output_buf); #endif - sprintf(output_buf, "%d", MODULE_MAGIC_NUMBER); + snprintf(output_buf, sizeof(output_buf), "%d", MODULE_MAGIC_NUMBER); php_info_print_table_row(2, "Apache API Version", output_buf); snprintf(output_buf, sizeof(output_buf), "%s:%u", serv->server_hostname, serv->port); php_info_print_table_row(2, "Hostname:Port", output_buf); #if !defined(WIN32) && !defined(WINNT) snprintf(output_buf, sizeof(output_buf), "%s(%d)/%d", user_name, (int)user_id, (int)group_id); php_info_print_table_row(2, "User/Group", output_buf); - sprintf(output_buf, "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max); + snprintf(output_buf, sizeof(output_buf), "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max); php_info_print_table_row(2, "Max Requests", output_buf); #endif - sprintf(output_buf, "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout); + snprintf(output_buf, sizeof(output_buf), "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout); php_info_print_table_row(2, "Timeouts", output_buf); #if !defined(WIN32) && !defined(WINNT) /* |