Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163510735
D58293.id182107.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
844 B
Referenced Files
None
Subscribers
None
D58293.id182107.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
Fri, Jul 24, 11:30 PM (7 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35192823
Default Alt Text
D58293.id182107.diff (844 B)
Attached To
Mode
D58293: bhyve: check upper bounds for value from qsz
Attached
Detach File
Event Timeline
Log In to Comment