提交 30ac379a 编写于 作者: D Dan Carpenter 提交者: James Bottomley

[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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NAnil Gurumurthy <agurumur@brocade.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 2be509c9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册