diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-01-10 04:06:20 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-29 19:54:54 -0500 |
commit | 30ac379a6921b14f4c44e13875d39b8f8f478958 (patch) | |
tree | 69148f965737a2283ff516523be7d530803835d1 /drivers/scsi/bfa | |
parent | 2be509c97fdc2cfc6771d97f346ff5e4c5c85089 (diff) |
[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>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfad.c | 2 |
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) { | |||
1034 | sizeof(driver_info.host_os_patch) - 1); | 1034 | sizeof(driver_info.host_os_patch) - 1); |
1035 | 1035 | ||
1036 | strncpy(driver_info.os_device_name, bfad->pci_name, | 1036 | strncpy(driver_info.os_device_name, bfad->pci_name, |
1037 | sizeof(driver_info.os_device_name - 1)); | 1037 | sizeof(driver_info.os_device_name) - 1); |
1038 | 1038 | ||
1039 | /* FCS driver info init */ | 1039 | /* FCS driver info init */ |
1040 | spin_lock_irqsave(&bfad->bfad_lock, flags); | 1040 | spin_lock_irqsave(&bfad->bfad_lock, flags); |