mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 04:25:10 -07:00
scrypt extra parameters checks
This commit is contained in:
parent
392f094a90
commit
5f74196b0f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user