mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 01:55:19 +01:00
nvmf: Use strlcpy instead of strncpy to ensure termination
Reported by: Coverity Scan CID: 1545054 Sponsored by: Chelsio Communications
This commit is contained in:
parent
bf1820f187
commit
1f029b86bb
@ -183,7 +183,7 @@ nvmf_sim_action(struct cam_sim *sim, union ccb *ccb)
|
||||
cpi->xport_specific.nvmf.nsid =
|
||||
xpt_path_lun_id(ccb->ccb_h.path);
|
||||
cpi->xport_specific.nvmf.trtype = sc->trtype;
|
||||
strncpy(cpi->xport_specific.nvmf.dev_name,
|
||||
strlcpy(cpi->xport_specific.nvmf.dev_name,
|
||||
device_get_nameunit(sc->dev),
|
||||
sizeof(cpi->xport_specific.nvmf.dev_name));
|
||||
cpi->maxio = sc->max_xfer_size;
|
||||
|
Loading…
Reference in New Issue
Block a user