diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-31 11:32:09 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2015-06-01 19:38:57 +0200 |
commit | 2cb2978559b36e14c79fdf7cb016b73f7c60169d (patch) | |
tree | 31db634c4b68dc05bec13b08db07b9cd3d750b5b /src/arch/x86/boot | |
parent | 72ee183c384a759712f256f5f4faa7394bcea9ec (diff) |
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>
Diffstat (limited to 'src/arch/x86/boot')
-rw-r--r-- | src/arch/x86/boot/acpi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c index a7a638ffa4..4ce5ed6036 100644 --- a/src/arch/x86/boot/acpi.c +++ b/src/arch/x86/boot/acpi.c @@ -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; } |