File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -206,21 +206,23 @@ static PHP_MSHUTDOWN_FUNCTION(dba)
206
206
return SUCCESS ;
207
207
}
208
208
209
+ #include "ext/standard/php_smart_str.h"
209
210
210
211
static PHP_MINFO_FUNCTION (dba )
211
212
{
212
213
dba_handler * hptr ;
213
- static char handlers [ 80 ], tmp [ 5 ] ;
214
+ smart_str handlers = { 0 } ;
214
215
215
216
for (hptr = handler ; hptr -> name ; hptr ++ ) {
216
- sprintf ( tmp , "%s " , hptr -> name );
217
- strcat ( handlers , tmp );
217
+ smart_str_appends ( & handlers , hptr -> name );
218
+ smart_str_appendc ( & handlers , ' ' );
218
219
}
219
220
220
221
php_info_print_table_start ();
221
222
php_info_print_table_row (2 , "DBA support" , "enabled" );
222
- php_info_print_table_row (2 , "Supported handlers" , handlers );
223
+ php_info_print_table_row (2 , "Supported handlers" , handlers . c );
223
224
php_info_print_table_end ();
225
+ smart_str_free (& handlers );
224
226
}
225
227
226
228
You can’t perform that action at this time.
0 commit comments