fixup: str2double bug

This commit is contained in:
Daniel Stenberg 2017-08-06 21:32:43 +02:00
parent f1c26efcbf
commit 8661a0aacc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -218,7 +218,7 @@ static ParameterError str2double(double *val, const char *str, long max)
num = strtod(str, &endptr);
if(errno == ERANGE)
return PARAM_NUMBER_TOO_LARGE;
if((long)val > max) {
if((long)num > max) {
/* too large */
return PARAM_NUMBER_TOO_LARGE;
}