diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-11-22 11:42:04 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-11-23 12:19:47 -0800 |
| commit | c2099fa61664e8fe8844cccdb7d1d18a5f0f94d1 (patch) | |
| tree | 9c01024f2cd74559b68d672ed0e3f437c0af7724 /include/crypto | |
| parent | 580f1d31dff62b0f0034304bd75f169b8fec6f36 (diff) | |
lib/crypto: poly1305: Add at_least decoration to fixed-size array params
Add the at_least (i.e. 'static') decoration to the fixed-size array
parameters of the poly1305 library functions. This causes clang to warn
when a too-small array of known size is passed.
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: "Jason A. Donenfeld" <Jason@zx2c4.com>
Link: https://lore.kernel.org/r/20251122194206.31822-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'include/crypto')
| -rw-r--r-- | include/crypto/poly1305.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crypto/poly1305.h b/include/crypto/poly1305.h index d4daeec8da19..190beb427c6d 100644 --- a/include/crypto/poly1305.h +++ b/include/crypto/poly1305.h @@ -59,7 +59,7 @@ struct poly1305_desc_ctx { }; void poly1305_init(struct poly1305_desc_ctx *desc, - const u8 key[POLY1305_KEY_SIZE]); + const u8 key[at_least POLY1305_KEY_SIZE]); void poly1305_update(struct poly1305_desc_ctx *desc, const u8 *src, unsigned int nbytes); void poly1305_final(struct poly1305_desc_ctx *desc, u8 *digest); |