summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/smbios.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 03d95e07f0..305ba40fe1 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -46,6 +46,13 @@ int smbios_add_string(char *start, const char *str)
int i = 1;
char *p = start;
+ /*
+ * Return 0 as required for empty strings.
+ * See Section 6.1.3 "Text Strings" of the SMBIOS specification.
+ */
+ if (*str == '\0')
+ return 0;
+
for(;;) {
if (!*p) {
strcpy(p, str);