Currently, curl allows users to specify absurd request rates that might
be higher than the number of milliseconds in the unit (ex: curl --rate
3600050/h http://localhost:8080 does not error out despite there being
only 3600000ms in a hour).
This change adds a conditional check before the millisecond calculation
making sure that the number is not higher than the numerator (the unit)
If the number is higher, curl errors out with PARAM_NUMBER_TOO_LARGE
Closes #12116
break;
}
}
+
+ if(denominator > numerator) {
+ err = PARAM_NUMBER_TOO_LARGE;
+ break;
+ }
+
global->ms_per_transfer = numerator/denominator;
}
break;