mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #8428
7a31d25
keccak: error out if passed mdlen 100 (moneromooo-monero)
This commit is contained in:
commit
53a8cf7f8c
@ -123,7 +123,7 @@ void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
|
|||||||
size_t i, rsiz, rsizw;
|
size_t i, rsiz, rsizw;
|
||||||
|
|
||||||
static_assert(HASH_DATA_AREA <= sizeof(temp), "Bad keccak preconditions");
|
static_assert(HASH_DATA_AREA <= sizeof(temp), "Bad keccak preconditions");
|
||||||
if (mdlen <= 0 || (mdlen > 100 && sizeof(st) != (size_t)mdlen))
|
if (mdlen <= 0 || (mdlen >= 100 && sizeof(st) != (size_t)mdlen))
|
||||||
{
|
{
|
||||||
local_abort("Bad keccak use");
|
local_abort("Bad keccak use");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user