diff options
author | luigi1111 <luigi1111w@gmail.com> | 2022-08-22 22:45:59 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2022-08-22 22:45:59 -0500 |
commit | 53a8cf7f8cb580a9ddebfb35e21b6c83f777eb4b (patch) | |
tree | 0a600bebd0787414a542a8c220e6f2ec52bfa9d7 /src/crypto/keccak.c | |
parent | Merge pull request #8427 (diff) | |
parent | keccak: error out if passed mdlen 100 (diff) | |
download | monero-53a8cf7f8cb580a9ddebfb35e21b6c83f777eb4b.tar.xz |
Merge pull request #8428
7a31d25 keccak: error out if passed mdlen 100 (moneromooo-monero)
Diffstat (limited to 'src/crypto/keccak.c')
-rw-r--r-- | src/crypto/keccak.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/keccak.c b/src/crypto/keccak.c index f098cbdf0..6616d3530 100644 --- a/src/crypto/keccak.c +++ b/src/crypto/keccak.c @@ -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"); } |