Page MenuHomeFreeBSD

D23679.diff
No OneTemporary

D23679.diff

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

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)

Event Timeline