diff options
author | Angel Pons <th3fanbus@gmail.com> | 2022-10-11 21:08:08 +0200 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-10-13 06:46:12 +0000 |
commit | cdc156ebd17655646eb178784e96036f58ac7859 (patch) | |
tree | 0f199025d19177d1bdc5d39d0bf80bcb71675fe4 /src/mainboard/prodrive/hermes/mainboard.c | |
parent | 549c2cd24fd24b70c2d34ef1fa0cccaecf59ad9f (diff) |
mb/prodrive/hermes: Harden `eeprom_read_serial()`
The `eeprom_read_serial()` function could return a non-NULL terminated
string if the serial in EEPROM has `HERMES_SN_PN_LENGTH` (32) non-NULL
characters. Make this impossible by adding an additional character for
a NULL byte in the static buffer, which always gets set to 0 (NULL).
Change-Id: I306fe1b6dd3836156afca786e352d2a7dca0d77c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68322
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'src/mainboard/prodrive/hermes/mainboard.c')
0 files changed, 0 insertions, 0 deletions