1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Remove bogus SCRAM_ITERATION_LEN constant.

It was not used for what the comment claimed, at all. It was actually used
as the 'base' argument to strtol(), when reading the iteration count. We
don't need a constant for base-10, so remove it.
This commit is contained in:
Heikki Linnakangas
2017-04-06 17:41:48 +03:00
parent cd0cebaf7d
commit 07044efe00
3 changed files with 2 additions and 5 deletions

View File

@ -444,7 +444,7 @@ read_server_first_message(fe_scram_state *state, char *input,
/* read_attr_value() has generated an error string */
return false;
}
state->iterations = strtol(iterations_str, &endptr, SCRAM_ITERATION_LEN);
state->iterations = strtol(iterations_str, &endptr, 10);
if (*endptr != '\0' || state->iterations < 1)
{
printfPQExpBuffer(errormessage,