aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ablkcipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ablkcipher.c')
-rw-r--r--crypto/ablkcipher.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 533de9550a82..7d4a8d28277e 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -388,9 +388,9 @@ static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
388{ 388{
389 struct crypto_report_blkcipher rblkcipher; 389 struct crypto_report_blkcipher rblkcipher;
390 390
391 snprintf(rblkcipher.type, CRYPTO_MAX_ALG_NAME, "%s", "ablkcipher"); 391 strncpy(rblkcipher.type, "ablkcipher", sizeof(rblkcipher.type));
392 snprintf(rblkcipher.geniv, CRYPTO_MAX_ALG_NAME, "%s", 392 strncpy(rblkcipher.geniv, alg->cra_ablkcipher.geniv ?: "<default>",
393 alg->cra_ablkcipher.geniv ?: "<default>"); 393 sizeof(rblkcipher.geniv));
394 394
395 rblkcipher.blocksize = alg->cra_blocksize; 395 rblkcipher.blocksize = alg->cra_blocksize;
396 rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize; 396 rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;
@@ -469,9 +469,9 @@ static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
469{ 469{
470 struct crypto_report_blkcipher rblkcipher; 470 struct crypto_report_blkcipher rblkcipher;
471 471
472 snprintf(rblkcipher.type, CRYPTO_MAX_ALG_NAME, "%s", "givcipher"); 472 strncpy(rblkcipher.type, "givcipher", sizeof(rblkcipher.type));
473 snprintf(rblkcipher.geniv, CRYPTO_MAX_ALG_NAME, "%s", 473 strncpy(rblkcipher.geniv, alg->cra_ablkcipher.geniv ?: "<built-in>",
474 alg->cra_ablkcipher.geniv ?: "<built-in>"); 474 sizeof(rblkcipher.geniv));
475 475
476 rblkcipher.blocksize = alg->cra_blocksize; 476 rblkcipher.blocksize = alg->cra_blocksize;
477 rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize; 477 rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;