drivers/i2c/at24rf08c/lenovo_serials: Fix out of bounds
Ensure that the mainboard version string is fully contained within one 128byte block of the EEPROM. Since it's read from offset 0x27 it can be 89 characters long. One byte for the final null terminator. Change-Id: I264ea2d1f634bb3493858da9f066bd6cef1ca960 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91041 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
parent
c242193ca4
commit
702cec8635
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ void smbios_system_set_uuid(u8 *uuid)
|
|||
|
||||
const char *smbios_mainboard_version(void)
|
||||
{
|
||||
static char result[100];
|
||||
static char result[90];
|
||||
static int already_read;
|
||||
struct device *dev;
|
||||
int len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue