mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 00:12:45 +00:00
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