Commit e4de5adb authored by Joe Orton's avatar Joe Orton
Browse files

Merge r1617913 from trunk:

* support/ab.c: Fix crash caused by integer overflow when printing stats with
lot of requests (for example -n 500000000).

Submitted by: jkaluza
Reviewed by: jorton, jim, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1826310 13f79535-47bb-0310-9956-ffa450edef68
parent cc6357f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@ Changes with Apache 2.4.32
  *) mod_ssl: Support SSL DN raw variable extraction without conversion
     to UTF-8, using _RAW suffix on variable names.  [Joe Orton]

  *) ab: Fix send length calculation for the non-blocking connect case
     introduced in 2.4.30.  [Joe Orton]
  *) ab: Fix https:// connection failures (regression in 2.4.30); fix
     crash generating CSV output for large -n.  [Joe Orton, Jan Kaluza]

Changes with Apache 2.4.31

+2 −2
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ static void output_results(int sig)
                           ap_round_ms(stats[done - 1].time));
                else
                    printf("  %d%%  %5" APR_TIME_T_FMT "\n", percs[i],
                           ap_round_ms(stats[(int) (done * percs[i] / 100)].time));
                           ap_round_ms(stats[(unsigned long)done * percs[i] / 100].time));
            }
        }
        if (csvperc) {
@@ -1123,7 +1123,7 @@ static void output_results(int sig)
                else if (i == 100)
                    t = ap_double_ms(stats[done - 1].time);
                else
                    t = ap_double_ms(stats[(int) (0.5 + done * i / 100.0)].time);
                    t = ap_double_ms(stats[(unsigned long) (0.5 + (double)done * i / 100.0)].time);
                fprintf(out, "%d,%.3f\n", i, t);
            }
            fclose(out);