Skip to content

Commit

Permalink
[SCSI] bfa: fix strncpy() limiter in bfad_start_ops()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Jan 30, 2013
1 parent 2be509c commit 30ac379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/bfa/bfad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 30ac379

Please sign in to comment.