aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-08-22 22:45:59 -0500
committerluigi1111 <luigi1111w@gmail.com>2022-08-22 22:45:59 -0500
commit53a8cf7f8cb580a9ddebfb35e21b6c83f777eb4b (patch)
tree0a600bebd0787414a542a8c220e6f2ec52bfa9d7
parentMerge pull request #8427 (diff)
parentkeccak: error out if passed mdlen 100 (diff)
downloadmonero-53a8cf7f8cb580a9ddebfb35e21b6c83f777eb4b.tar.xz
Merge pull request #8428
7a31d25 keccak: error out if passed mdlen 100 (moneromooo-monero)
-rw-r--r--src/crypto/keccak.c2
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");
}