Skip to content

Commit

Permalink
Merge pull request #8428
Browse files Browse the repository at this point in the history
7a31d25 keccak: error out if passed mdlen 100 (moneromooo-monero)
  • Loading branch information
luigi1111 committed Aug 23, 2022
2 parents ce80747 + 7a31d25 commit 53a8cf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/keccak.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
size_t i, rsiz, rsizw;

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");
}
Expand Down

0 comments on commit 53a8cf7

Please sign in to comment.