aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-02 15:48:06 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-02 15:48:06 +0000
commit03887f1140331326e3e6ca0a24161dd7ab74af1e (patch)
tree5ae0d4d3eb491b27e5fb56dcd7b3737daf18692a /src
parentblockchain_db: initialize m_open in base class ctor (diff)
downloadmonero-03887f1140331326e3e6ca0a24161dd7ab74af1e.tar.xz
keccak: fix sanity check bounds test
Nothing calls this with those inputs
Diffstat (limited to 'src')
-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 fc6d487c2..7386d37a3 100644
--- a/src/crypto/keccak.c
+++ b/src/crypto/keccak.c
@@ -99,7 +99,7 @@ void keccak(const uint8_t *in, size_t inlen, uint8_t *md, int mdlen)
}
// last block and padding
- if (inlen >= sizeof(temp) || inlen > rsiz || rsiz - inlen + inlen + 1 >= sizeof(temp) || rsiz == 0 || rsiz - 1 >= sizeof(temp) || rsizw * 8 > sizeof(temp))
+ if (inlen + 1 >= sizeof(temp) || inlen > rsiz || rsiz - inlen + inlen + 1 >= sizeof(temp) || rsiz == 0 || rsiz - 1 >= sizeof(temp) || rsizw * 8 > sizeof(temp))
{
fprintf(stderr, "Bad keccak use");
abort();