aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp/spi
diff options
context:
space:
mode:
authorluozhengzheng <[email protected]>2016-10-21 02:09:39 +0800
committerBrian Behlendorf <[email protected]>2016-10-20 11:09:39 -0700
commit1f72394443f710a0be11232b557b8a698693668d (patch)
tree9eaa824aafba089393aa01b48738e9a61086f421 /module/icp/spi
parent381823d6d2f1b3bcd0ef6a4f391396e5d9406036 (diff)
Fix coverity defects: CID 150919, 150923
CID 150919: Buffer not null terminated (BUFFER_SIZE_WARNING) CID 150923: Buffer not null terminated (BUFFER_SIZE_WARNING) Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tom Caputi <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5298
Diffstat (limited to 'module/icp/spi')
-rw-r--r--module/icp/spi/kcf_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/icp/spi/kcf_spi.c b/module/icp/spi/kcf_spi.c
index e6e463a62..8bd86b0a3 100644
--- a/module/icp/spi/kcf_spi.c
+++ b/module/icp/spi/kcf_spi.c
@@ -889,7 +889,7 @@ kcf_do_notify(kcf_provider_desc_t *prov_desc, boolean_t is_added)
ec.ec_change = is_added ? CRYPTO_MECH_ADDED :
CRYPTO_MECH_REMOVED;
for (i = 0; i < prov_desc->pd_mech_list_count; i++) {
- (void) strncpy(ec.ec_mech_name,
+ (void) strlcpy(ec.ec_mech_name,
prov_desc->pd_mechanisms[i].cm_mech_name,
CRYPTO_MAX_MECH_NAME);
kcf_walk_ntfylist(CRYPTO_EVENT_MECHS_CHANGED, &ec);