Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159277555
D45895.id140671.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
702 B
Referenced Files
None
Subscribers
None
D45895.id140671.diff
View Options
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1190,7 +1190,7 @@
int len;
len = vpd_read_elem_head(vrs, keyword);
- if (len > maxlen)
+ if (len < 0 || len > maxlen)
return (-1);
*value = vpd_read_value(vrs, len);
@@ -1211,7 +1211,7 @@
}
/* fetch one read-only element and return size of heading + data */
-static size_t
+static int
next_vpd_ro_elem(struct vpd_readstate *vrs, int maxsize)
{
struct pcicfg_vpd *vpd;
@@ -1245,7 +1245,7 @@
}
/* fetch one writable element and return size of heading + data */
-static size_t
+static int
next_vpd_rw_elem(struct vpd_readstate *vrs, int maxsize)
{
struct pcicfg_vpd *vpd;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 13, 6:50 AM (15 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33921568
Default Alt Text
D45895.id140671.diff (702 B)
Attached To
Mode
D45895: pci: propagate vpd read error
Attached
Detach File
Event Timeline
Log In to Comment