summaryrefslogtreecommitdiff
path: root/crypto/kpp.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-02-07 16:44:43 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-02-07 16:44:43 +0100
commitfa52b9919271e59a73b989df5c92bbf0bb983c3d (patch)
treead35f7c066ef1e52febbbfc0fc62fe9623cc4e00 /crypto/kpp.c
parent6e603ea6e028001e3d56dc56822cb9c1cf2908f9 (diff)
parentbc2a1ca9b6b0c50decebcbb4c6b4160cf81eed93 (diff)
downloadlinux-crypto-fa52b9919271e59a73b989df5c92bbf0bb983c3d.tar.gz
linux-crypto-fa52b9919271e59a73b989df5c92bbf0bb983c3d.zip
Merge tag 'v5.0-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 5.0-rc5 Sync with upstream (which now contains fbdev-v5.0-rc3 changes) to prepare a base for fbdev-v5.1 changes.
Diffstat (limited to 'crypto/kpp.c')
-rw-r--r--crypto/kpp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/crypto/kpp.c b/crypto/kpp.c
index a90edc27..bc2f1006 100644
--- a/crypto/kpp.c
+++ b/crypto/kpp.c
@@ -30,15 +30,11 @@ static int crypto_kpp_report(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_kpp rkpp;
- strncpy(rkpp.type, "kpp", sizeof(rkpp.type));
+ memset(&rkpp, 0, sizeof(rkpp));
- if (nla_put(skb, CRYPTOCFGA_REPORT_KPP,
- sizeof(struct crypto_report_kpp), &rkpp))
- goto nla_put_failure;
- return 0;
+ strscpy(rkpp.type, "kpp", sizeof(rkpp.type));
-nla_put_failure:
- return -EMSGSIZE;
+ return nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(rkpp), &rkpp);
}
#else
static int crypto_kpp_report(struct sk_buff *skb, struct crypto_alg *alg)