From 0fa007be131f161bbc4c7b7422e53dd702361638 Mon Sep 17 00:00:00 2001 From: Kevin Chiu Date: Wed, 3 Oct 2018 10:12:44 +0800 Subject: google/grunt: Correctly extract OEM string from CBFS In CBFS layout: oem.bin size is 10 bytes. In cbfs_boot_load_file, buffer size will need to be larger than decompressed_size, otherwise CBFS data can not be extracted into buffer. Then we need to check buffer whether it's empty string separately. BUG=b:79874904 BRANCH=master TEST=emerge-grunt coreboot Change-Id: I4f1bbb690ecca515ac920f5058ee19b5bfd8fa5e Signed-off-by: Kevin Chiu Reviewed-on: https://review.coreboot.org/28889 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/google/kahlee/variants/baseboard/mainboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c index d60023fa7c..d1a349283e 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c +++ b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c @@ -79,7 +79,7 @@ void board_bh720(struct device *dev) const char *smbios_mainboard_manufacturer(void) { - static char oem_bin_data[10]; + static char oem_bin_data[11]; static const char *manuf; if (!IS_ENABLED(CONFIG_USE_OEM_BIN)) -- cgit v1.2.3