mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
tool_getparam/set_rate: skip the multiplication on overflow
The code detected the problem but didn't avoid the calculation correctly. Fixes #18624 Reported-by: BobodevMm on github Closes #18625
This commit is contained in:
@@ -1012,8 +1012,9 @@ static ParameterError set_rate(const char *nextarg)
|
||||
errorf("too large --rate unit");
|
||||
err = PARAM_NUMBER_TOO_LARGE;
|
||||
}
|
||||
/* this typecast is okay based on the check above */
|
||||
numerator *= (long)numunits;
|
||||
else
|
||||
/* this typecast is okay based on the check above */
|
||||
numerator *= (long)numunits;
|
||||
}
|
||||
|
||||
if(err)
|
||||
|
||||
Reference in New Issue
Block a user