From: Niels Möller Date: Sun, 24 Mar 2024 12:50:54 +0000 (+0100) Subject: Add assert in _nettle_sha3_update. X-Git-Tag: nettle_3.10rc1~19^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dda0972d344fbacbe9912eb20d09637e324d1a2e;p=thirdparty%2Fnettle.git Add assert in _nettle_sha3_update. --- diff --git a/sha3.c b/sha3.c index d5b0fe49..d2f27323 100644 --- a/sha3.c +++ b/sha3.c @@ -73,6 +73,8 @@ _nettle_sha3_update (struct sha3_state *state, unsigned pos, size_t length, const uint8_t *data) { + assert (pos < block_size); + if (!length) return pos;