From d0df1d7c4ebd4d8e654c8350c27a0d9f749a88f6 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Tue, 1 Aug 2017 15:52:46 +0300 Subject: SMBIOS: Correct length calculation for empty string table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If all strings in SMBIOS table are empty, smbios_string_table_len function should return 2, cause every table must end with "\0\0". Also replace "eos" field type in smbios structures from char to u8. Change-Id: Ia3178b0030aa71e1ff11a3fd3d102942f0027eb1 Signed-off-by: Konstantin Aladyshev Reviewed-on: https://review.coreboot.org/20840 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/drivers/intel/wifi/wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/intel') diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c index d1d5684a19..77918e42d0 100644 --- a/src/drivers/intel/wifi/wifi.c +++ b/src/drivers/intel/wifi/wifi.c @@ -40,7 +40,7 @@ static int smbios_write_wifi(struct device *dev, int *handle, u8 length; u16 handle; u8 str; - char eos[2]; + u8 eos[2]; } __packed; struct smbios_type_intel_wifi *t = -- cgit v1.2.3