From dda0972d344fbacbe9912eb20d09637e324d1a2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Sun, 24 Mar 2024 13:50:54 +0100 Subject: [PATCH] Add assert in _nettle_sha3_update. --- sha3.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.3