SLIC: Check SLIC signature.

Change-Id: I79fd4d17b534274b1e84bc97ca5a2a6ee55e3114
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10383
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Vladimir Serbinenko 2015-05-31 11:32:09 +02:00
parent 72ee183c38
commit 2cb2978559
1 changed files with 4 additions and 2 deletions

View File

@ -762,8 +762,10 @@ unsigned long write_acpi_tables(unsigned long start)
slic_file = cbfs_get_file_content(CBFS_DEFAULT_MEDIA,
CONFIG_CBFS_PREFIX "/slic",
CBFS_TYPE_RAW, &slic_size);
if (slic_file && (slic_file->length > slic_size
|| slic_file->length < sizeof (acpi_header_t))) {
if (slic_file
&& (slic_file->length > slic_size
|| slic_file->length < sizeof (acpi_header_t)
|| memcmp(slic_file->signature, "SLIC", 4) != 0)) {
slic_file = 0;
}