all of the limits could use review, but err on the side of avoiding
excessive rounds for now.
}
count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0'));
- if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
+ if (count < min || count > 2048 || BF_decode(data.binary.salt, &setting[7], 16)) {
return NULL;
}
BF_swap(data.binary.salt, 4);
return NULL;
count |= value << (i - 1) * 6;
}
- if (!count)
+ if (!count || count > 262143)
return NULL;
for (i = 5, salt = 0; i < 9; i++) {