Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178150993
D58293.1796124273.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
844 B
Referenced Files
None
Subscribers
None
D58293.1796124273.diff
View Options
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -3167,7 +3167,6 @@
char bident[sizeof("XXX:XXX")];
const char *value;
uint32_t sectsz;
- int val;
sc->max_queues = NVME_QUEUES;
sc->max_qentries = NVME_MAX_QENTRIES;
@@ -3184,8 +3183,8 @@
sc->max_queues = atoi(value);
value = get_config_value_node(nvl, "qsz");
if (value != NULL) {
- val = atoi(value);
- if (val <= 0) {
+ int val = atoi(value);
+ if (val <= 0 || val > UINT16_MAX) {
EPRINTLN("nvme: Invalid qsz option %d", val);
return (-1);
}
@@ -3193,7 +3192,7 @@
}
value = get_config_value_node(nvl, "ioslots");
if (value != NULL) {
- val = atoi(value);
+ int val = atoi(value);
if (val <= 0) {
EPRINTLN("Invalid ioslots option %d", val);
return (-1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 1, 11:24 AM (16 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42123890
Default Alt Text
D58293.1796124273.diff (844 B)
Attached To
Mode
D58293: bhyve: check upper bounds for value from qsz
Attached
Detach File
Event Timeline