Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Dec 2022 20:34:14 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d256a06fe8bd - main - aesni: Remove misleading array bounds for aesni_decryt_ecb.
Message-ID:  <202212072034.2B7KYEFc088656@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=d256a06fe8bda8120a3e22434c53fdef076001d3

commit d256a06fe8bda8120a3e22434c53fdef076001d3
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-07 20:32:19 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-12-07 20:32:19 +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
---
 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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212072034.2B7KYEFc088656>