summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-01-10 10:06:20 +0100
committerJames Bottomley <JBottomley@Parallels.com>2013-01-30 01:54:54 +0100
commit30ac379a6921b14f4c44e13875d39b8f8f478958 (patch)
tree69148f965737a2283ff516523be7d530803835d1
parent[SCSI] qla4xxx: Update driver version to 5.03.00-k3 (diff)
downloadlinux-30ac379a6921b14f4c44e13875d39b8f8f478958.tar.xz
linux-30ac379a6921b14f4c44e13875d39b8f8f478958.zip
[SCSI] bfa: fix strncpy() limiter in bfad_start_ops()
The closing parenthesis is in the wrong place so it takes the sizeof a pointer instead of the sizeof the buffer minus one. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Anil Gurumurthy <agurumur@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/bfa/bfad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index e6bf12675db8..a5f7690e819e 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1034,7 +1034,7 @@ bfad_start_ops(struct bfad_s *bfad) {
sizeof(driver_info.host_os_patch) - 1);
strncpy(driver_info.os_device_name, bfad->pci_name,
- sizeof(driver_info.os_device_name - 1));
+ sizeof(driver_info.os_device_name) - 1);
/* FCS driver info init */
spin_lock_irqsave(&bfad->bfad_lock, flags);