]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Add assert in _nettle_sha3_update.
authorNiels Möller <nisse@lysator.liu.se>
Sun, 24 Mar 2024 12:50:54 +0000 (13:50 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 24 Mar 2024 12:50:54 +0000 (13:50 +0100)
sha3.c

diff --git a/sha3.c b/sha3.c
index d5b0fe49b6b6d5fc23f3155695d0a6fe64acc118..d2f27323fc7cecca5ef312e949636e6f262bf08d 100644 (file)
--- 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;