diff options
Diffstat (limited to 'source/components/tables/tbfind.c')
-rw-r--r-- | source/components/tables/tbfind.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c index af790924105c2..4d360ae8bee34 100644 --- a/source/components/tables/tbfind.c +++ b/source/components/tables/tbfind.c @@ -73,14 +73,29 @@ AcpiTbFindTable ( char *OemTableId, UINT32 *TableIndex) { - UINT32 i; ACPI_STATUS Status; ACPI_TABLE_HEADER Header; + UINT32 i; ACPI_FUNCTION_TRACE (TbFindTable); + /* Validate the input table signature */ + + if (!AcpiIsValidSignature (Signature)) + { + return_ACPI_STATUS (AE_BAD_SIGNATURE); + } + + /* Don't allow the OEM strings to be too long */ + + if ((strlen (OemId) > ACPI_OEM_ID_SIZE) || + (strlen (OemTableId) > ACPI_OEM_TABLE_ID_SIZE)) + { + return_ACPI_STATUS (AE_AML_STRING_LIMIT); + } + /* Normalize the input strings */ memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); |