]> granicus.if.org Git - php/commitdiff
use strlcat()
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 13:30:18 +0000 (13:30 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 13:30:18 +0000 (13:30 +0000)
sapi/apache/php_apache.c
sapi/apache_hooks/php_apache.c

index 8452c18ecca8888dfd79d8629034ea1c91b996ff..3019f9b2e9b71c02ad520b9a77180bce9548e74c 100644 (file)
@@ -235,9 +235,9 @@ PHP_MINFO_FUNCTION(apache)
                if ((p = strrchr(name, '.'))) {
                        *p='\0'; /* Cut off ugly .c extensions on module names */
                }
-               strcat(modulenames, name);
+               strlcat(modulenames, name, sizeof(modulenames));
                if (modp->next) {
-                       strcat(modulenames, ", ");
+                       strlcat(modulenames, ", ", sizeof(modulenames));
                }
        }
        php_info_print_table_row(2, "Loaded Modules", modulenames);
index ce4f44b8a62351dbcd674c23f4eb74bb469cc18e..2a9bf8e3677cdf7ad229c5d7ddc6201966be0ab6 100644 (file)
@@ -1637,9 +1637,9 @@ PHP_MINFO_FUNCTION(apache)
                if ((p = strrchr(name, '.'))) {
                        *p='\0'; /* Cut off ugly .c extensions on module names */
                }
-               strcat(modulenames, name);
+               strlcat(modulenames, name, sizeof(modulenames));
                if (modp->next) {
-                       strcat(modulenames, ", ");
+                       strlcat(modulenames, ", ", sizeof(modulenames));
                }
        }
        php_info_print_table_row(2, "Loaded Modules", modulenames);