summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/smbios.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 188fb4256f..1ec0ad20fe 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -45,7 +45,7 @@ int smbios_add_string(u8 *start, const char *str)
* 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 (;;) {