apache
Missing to convert floating point to long integer
mod_status does not work when !HAVE_TIMES because a wrong format parameter in a printf.
Bug fixed by commit b833f064550
Type | IncompatibleType |
Config | "!HAVE_TIMES" (1st degree) |
Fix-in | code |
Location | modules/generators/ |
#include <stdio.h> void status_handler() { long x = 2147483644; long y = 2147483645; #ifndef HAVE_TIMES printf("%f %ld", #else printf("%ld %ld", #endif (long) x, (long) y); } void register_hooks() { status_handler(); } int main(void) { register_hooks(); return 0; }
. call modules/generators/mod_status.c:824:register_hooks() . 826: status_handler() .. call modules/generators/mod_status.c:237:status_handler() .. // if HAVE_TIMES is disabled .. ERROR 638: ap_rprintf(r, "]\n %.0f %ld (",