altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

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

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