Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109580339
D23679.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
684 B
Referenced Files
None
Subscribers
None
D23679.diff
View Options
Index: head/sys/dev/pci/pci.c
===================================================================
--- head/sys/dev/pci/pci.c
+++ head/sys/dev/pci/pci.c
@@ -1102,16 +1102,16 @@
break;
}
remain |= byte2 << 8;
- if (remain > (0x7f*4 - vrs.off)) {
- state = -1;
- pci_printf(cfg,
- "invalid VPD data, remain %#x\n",
- remain);
- }
name = byte & 0x7f;
} else {
remain = byte & 0x7;
name = (byte >> 3) & 0xf;
+ }
+ if (vrs.off + remain - vrs.bytesinval > 0x8000) {
+ pci_printf(cfg,
+ "VPD data overflow, remain %#x\n", remain);
+ state = -1;
+ break;
}
switch (name) {
case 0x2: /* String */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 8, 12:09 AM (19 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16518612
Default Alt Text
D23679.diff (684 B)
Attached To
Mode
D23679: Remove spurious warning about invalid VPD data.
Attached
Detach File
Event Timeline
Log In to Comment