mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
scrypt extra parameters checks
This commit is contained in:
+4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user