diff options
author | luozhengzheng <[email protected]> | 2016-10-21 02:09:39 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-10-20 11:09:39 -0700 |
commit | 1f72394443f710a0be11232b557b8a698693668d (patch) | |
tree | 9eaa824aafba089393aa01b48738e9a61086f421 /module/icp/os/modconf.c | |
parent | 381823d6d2f1b3bcd0ef6a4f391396e5d9406036 (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/os/modconf.c')
-rw-r--r-- | module/icp/os/modconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/icp/os/modconf.c b/module/icp/os/modconf.c index e0cd7f4ad..32b46b5ff 100644 --- a/module/icp/os/modconf.c +++ b/module/icp/os/modconf.c @@ -146,7 +146,7 @@ mod_info(struct modlinkage *modlp, struct modinfo *modinfop) if (*linkpp == NULL) { msip->msi_linkinfo[0] = '\0'; } else { - (void) strncpy(msip->msi_linkinfo, + (void) strlcpy(msip->msi_linkinfo, (*linkpp)->misc_linkinfo, MODMAXLINKINFOLEN); retval = MODL_INFO(*linkpp, modlp, &msip->msi_p0); if (retval != 0) |