keccak: fix sanity check bounds test

Nothing calls this with those inputs
This commit is contained in:
moneromooo-monero 2018-02-02 15:48:06 +00:00
parent ad11db9144
commit 03887f1140
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -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();