aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-01-10 12:06:20 +0300
committerJames Bottomley <JBottomley@Parallels.com>2013-01-30 11:54:54 +1100
commit30ac379a6921b14f4c44e13875d39b8f8f478958 (patch)
tree69148f965737a2283ff516523be7d530803835d1
parent2be509c97fdc2cfc6771d97f346ff5e4c5c85089 (diff)
downloadkernel_goldelico_gta04-30ac379a6921b14f4c44e13875d39b8f8f478958.zip
kernel_goldelico_gta04-30ac379a6921b14f4c44e13875d39b8f8f478958.tar.gz
kernel_goldelico_gta04-30ac379a6921b14f4c44e13875d39b8f8f478958.tar.bz2
[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 e6bf126..a5f7690 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);