Skip to content

Commit d92a1f4

Browse files
author
Ilia Alshanetsky
committed
Fixed win32 build (bug #21506).
Fixed a bug that would cause garbage data to appear at the end of the loaded apache modules list in phpinfo().
1 parent 946032f commit d92a1f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sapi/apache2filter/php_functions.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040

4141
#include "php_apache.h"
4242

43-
extern module **ap_loaded_modules;
44-
4543
static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
4644
{
4745
php_struct *ctx;
@@ -342,6 +340,9 @@ PHP_MINFO_FUNCTION(apache)
342340
}
343341
smart_str_appendc(&tmp1, ' ');
344342
}
343+
if ((tmp1.len - 1) >= 0) {
344+
tmp1.c[tmp1.len - 1] = '\0';
345+
}
345346

346347
php_info_print_table_start();
347348
if (apv && *apv) {

0 commit comments

Comments
 (0)