Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30ac379a authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley
Browse files

[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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarAnil Gurumurthy <agurumur@brocade.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 2be509c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);