mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
secure check for ssdt length
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
a0c543f100
commit
f7add0788f
@ -913,7 +913,7 @@ void DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam
|
||||
|
||||
if (pacCount > 0 && pacCount % 3 == 0) {
|
||||
pacCount /= 3;
|
||||
DBG(" (Found hidden SSDT %lld pcs)\n", pacCount);
|
||||
DBG(" (Found hidden SSDT %lld pcs)\n", pacCount);
|
||||
|
||||
while (pacCount-- > 0) {
|
||||
// Skip text marker and addr type tag
|
||||
@ -937,8 +937,10 @@ void DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam
|
||||
CopyMem(&OemTableId[0], &((EFI_ACPI_DESCRIPTION_HEADER *)adr)->OemTableId, 8);
|
||||
OemTableId[8] = 0;
|
||||
stripTrailingSpaces(OemTableId);
|
||||
DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId,
|
||||
((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length);
|
||||
int innLen = ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length;
|
||||
if (innLen < 0 || innLen > 0x20000) break;
|
||||
DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId,
|
||||
((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, innLen);
|
||||
for (k = 0; k < 16; k++) {
|
||||
DBG("%02hhX ", ((UINT8*)adr)[k]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user