* [PATCH] crypto: essiv - Remove unnecessary strscpy() size argument
@ 2025-04-08 11:22 Thorsten Blum
2025-04-16 7:56 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-04-08 11:22 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: Thorsten Blum, linux-crypto, linux-kernel
If the destination buffer has a fixed length, strscpy() automatically
determines its size using sizeof() when the argument is omitted. This
makes the explicit size argument unnecessary - remove it.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
crypto/essiv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/crypto/essiv.c b/crypto/essiv.c
index 1c00c3324058..9d6e72a2d2ae 100644
--- a/crypto/essiv.c
+++ b/crypto/essiv.c
@@ -549,8 +549,7 @@ static int essiv_create(struct crypto_template *tmpl, struct rtattr **tb)
}
/* record the driver name so we can instantiate this exact algo later */
- strscpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name,
- CRYPTO_MAX_ALG_NAME);
+ strscpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name);
/* Instance fields */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: essiv - Remove unnecessary strscpy() size argument
2025-04-08 11:22 [PATCH] crypto: essiv - Remove unnecessary strscpy() size argument Thorsten Blum
@ 2025-04-16 7:56 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2025-04-16 7:56 UTC (permalink / raw)
To: Thorsten Blum; +Cc: David S. Miller, linux-crypto, linux-kernel
On Tue, Apr 08, 2025 at 01:22:59PM +0200, Thorsten Blum wrote:
> If the destination buffer has a fixed length, strscpy() automatically
> determines its size using sizeof() when the argument is omitted. This
> makes the explicit size argument unnecessary - remove it.
>
> No functional changes intended.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> crypto/essiv.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-16 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 11:22 [PATCH] crypto: essiv - Remove unnecessary strscpy() size argument Thorsten Blum
2025-04-16 7:56 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox