Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73980 )
(
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: arch/x86/smbios: Check str for NULL in smbios_add_string() ......................................................................
arch/x86/smbios: Check str for NULL in smbios_add_string()
Signed-off-by: Maximilian Brune maximilian.brune@9elements.com Change-Id: Ic228b869aea362c1f07e0808c2735ff3b285a6bd Reviewed-on: https://review.coreboot.org/c/coreboot/+/73980 Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@mailbox.org --- M src/arch/x86/smbios.c 1 file changed, 15 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Eric Lai: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 188fb42..1ec0ad2 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -45,7 +45,7 @@ * Return 0 as required for empty strings. * See Section 6.1.3 "Text Strings" of the SMBIOS specification. */ - if (*str == '\0') + if (str == NULL || *str == '\0') return 0;
for (;;) {