altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-ab-overflow.patch

75a229
--- a/support/ab.c	2014/08/14 12:12:38	1617912
75a229
+++ b/support/ab.c	2014/08/14 12:15:31	1617913
75a229
@@ -1029,7 +1029,7 @@
75a229
                            ap_round_ms(stats[done - 1].time));
75a229
                 else
75a229
                     printf("  %d%%  %5" APR_TIME_T_FMT "\n", percs[i],
75a229
-                           ap_round_ms(stats[(int) (done * percs[i] / 100)].time));
75a229
+                           ap_round_ms(stats[(unsigned long)done * percs[i] / 100].time));
75a229
             }
75a229
         }
75a229
         if (csvperc) {
75a229
@@ -1046,7 +1046,7 @@
75a229
                 else if (i == 100)
75a229
                     t = ap_double_ms(stats[done - 1].time);
75a229
                 else
75a229
-                    t = ap_double_ms(stats[(int) (0.5 + done * i / 100.0)].time);
75a229
+                    t = ap_double_ms(stats[(unsigned long) (0.5 + (double)done * i / 100.0)].time);
75a229
                 fprintf(out, "%d,%.3f\n", i, t);
75a229
             }
75a229
             fclose(out);