Make sure a $PIR table header has a valid length before accepting the table
as valid. Submitted by: Michal Mertl <mime@traveller.cz>
This commit is contained in:
parent
ba09ba1fce
commit
fefe985dc6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103145
@ -169,7 +169,8 @@ pci_cfgregopen(void)
|
||||
i < (pt->pt_header.ph_length); i++) {
|
||||
ck += cv[i];
|
||||
}
|
||||
if (ck == 0) {
|
||||
if (ck == 0 && pt->pt_header.ph_length >
|
||||
sizeof(struct PIR_header)) {
|
||||
pci_route_table = pt;
|
||||
pci_route_count = (pt->pt_header.ph_length -
|
||||
sizeof(struct PIR_header)) /
|
||||
|
@ -169,7 +169,8 @@ pci_cfgregopen(void)
|
||||
i < (pt->pt_header.ph_length); i++) {
|
||||
ck += cv[i];
|
||||
}
|
||||
if (ck == 0) {
|
||||
if (ck == 0 && pt->pt_header.ph_length >
|
||||
sizeof(struct PIR_header)) {
|
||||
pci_route_table = pt;
|
||||
pci_route_count = (pt->pt_header.ph_length -
|
||||
sizeof(struct PIR_header)) /
|
||||
|
@ -169,7 +169,8 @@ pci_cfgregopen(void)
|
||||
i < (pt->pt_header.ph_length); i++) {
|
||||
ck += cv[i];
|
||||
}
|
||||
if (ck == 0) {
|
||||
if (ck == 0 && pt->pt_header.ph_length >
|
||||
sizeof(struct PIR_header)) {
|
||||
pci_route_table = pt;
|
||||
pci_route_count = (pt->pt_header.ph_length -
|
||||
sizeof(struct PIR_header)) /
|
||||
|
Loading…
Reference in New Issue
Block a user