Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103903812
D45152.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
578 B
Referenced Files
None
Subscribers
None
D45152.diff
View Options
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c
--- a/sys/dev/nvme/nvme_sim.c
+++ b/sys/dev/nvme/nvme_sim.c
@@ -203,7 +203,7 @@
cpi->xport_specific.nvme.slot = pci_get_slot(dev);
cpi->xport_specific.nvme.function = pci_get_function(dev);
cpi->xport_specific.nvme.extra = 0;
- strncpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev),
+ strlcpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev),
sizeof(cpi->xport_specific.nvme.dev_name));
cpi->hba_vendor = pci_get_vendor(dev);
cpi->hba_device = pci_get_device(dev);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 11:56 PM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14973414
Default Alt Text
D45152.diff (578 B)
Attached To
Mode
D45152: nvme: Use strlcpy instead of strncpy to ensure termination
Attached
Detach File
Event Timeline
Log In to Comment