git: 22cb9d3f17c4 - stable/13 - aesni: Remove misleading array bounds for aesni_decryt_ecb.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 May 2023 00:29:58 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=22cb9d3f17c4706573ba847599faaa66b2a5f247
commit 22cb9d3f17c4706573ba847599faaa66b2a5f247
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-07 20:32:19 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-03 00:22:55 +0000
aesni: Remove misleading array bounds for aesni_decryt_ecb.
All the other functions used pointers for from/to instead of
fixed-size array parameters. More importantly, this function can
accept pointers to buffers of multiple blocks, not just a single
block.
Reported by: GCC -Warray-parameter
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D37547
(cherry picked from commit d256a06fe8bda8120a3e22434c53fdef076001d3)
---
sys/crypto/aesni/aesni_wrap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/crypto/aesni/aesni_wrap.c b/sys/crypto/aesni/aesni_wrap.c
index 4d2a45b7e4c4..cca69d3d5c96 100644
--- a/sys/crypto/aesni/aesni_wrap.c
+++ b/sys/crypto/aesni/aesni_wrap.c
@@ -147,7 +147,7 @@ aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len,
void
aesni_decrypt_ecb(int rounds, const void *key_schedule, size_t len,
- const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN])
+ const uint8_t *from, uint8_t *to)
{
__m128i tot;
__m128i tout[8];