diff options
author | Dan Carpenter | 2016-01-30 15:36:03 +0100 |
---|---|---|
committer | Martin K. Petersen | 2016-02-24 03:27:02 +0100 |
commit | aee5618dfeeb6f3a64005abe4056c1b256645f8a (patch) | |
tree | 6496a89066e5572d372b9dbd46d3f153cf1307cd | |
parent | megaraid: fix null pointer check in megasas_detach_one(). (diff) | |
download | kernel-qcow2-linux-aee5618dfeeb6f3a64005abe4056c1b256645f8a.tar.gz kernel-qcow2-linux-aee5618dfeeb6f3a64005abe4056c1b256645f8a.tar.xz kernel-qcow2-linux-aee5618dfeeb6f3a64005abe4056c1b256645f8a.zip |
bfa: use strncpy() instead of memcpy()
BFA_MFG_NAME is "QLogic" which is only 7 bytes, but we are copying 8
bytes. It's harmless because the badding byte is likely zero but it
makes static checkers complain.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 251e2ff8ff5f..a1ada4a31c97 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -2803,7 +2803,7 @@ void bfa_ioc_get_adapter_manufacturer(struct bfa_ioc_s *ioc, char *manufacturer) { memset((void *)manufacturer, 0, BFA_ADAPTER_MFG_NAME_LEN); - memcpy(manufacturer, BFA_MFG_NAME, BFA_ADAPTER_MFG_NAME_LEN); + strncpy(manufacturer, BFA_MFG_NAME, BFA_ADAPTER_MFG_NAME_LEN); } void |