jani Tue, 08 Dec 2009 16:13:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291879
Log:
MFB: sprintf -> snprintf (Thanks Marcus for not merging to HEAD..)
Changed paths:
U php/php-src/trunk/sapi/apache/php_apache.c
Modified: php/php-src/trunk/sapi/apache/php_apache.c
===================================================================
--- php/php-src/trunk/sapi/apache/php_apache.c 2009-12-08 15:27:37 UTC (rev
291878)
+++ php/php-src/trunk/sapi/apache/php_apache.c 2009-12-08 16:13:01 UTC (rev
291879)
@@ -244,20 +244,20 @@
}
#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);
- sprintf(output_buf, "%s:%u", serv->server_hostname, serv->port);
+ 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)
- sprintf(output_buf, "%s(%d)/%d", user_name, (int)user_id,
(int)group_id);
+ 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)
/*
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php