scrypt extra parameters checks

This commit is contained in:
Frank Denis 2015-06-19 18:55:41 +02:00
parent 392f094a90
commit 5f74196b0f

View File

@ -279,6 +279,10 @@ escrypt_kdf_nosse(escrypt_local_t * local,
errno = EFBIG;
return -1;
}
if (N > UINT32_MAX) {
errno = EFBIG;
return -1;
}
if (((N & (N - 1)) != 0) || (N < 2)) {
errno = EINVAL;
return -1;