diff options
-rw-r--r-- | dmidecode.c | 3 | ||||
-rw-r--r-- | dmioem.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/dmidecode.c b/dmidecode.c index 4c98553..27d5494 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -5243,7 +5243,8 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) /* assign vendor for vendor-specific decodes later */ if (h.type == 1 && h.length >= 6) - dmi_set_vendor(dmi_string(&h, data[0x04]), dmi_string(&h, data[0x5])); + dmi_set_vendor(_dmi_string(&h, data[0x04], 0), + _dmi_string(&h, data[0x05], 0)); /* Fixup a common mistake */ if (h.type == 34) @@ -68,7 +68,7 @@ void dmi_set_vendor(const char *v, const char *p) * Often DMI strings have trailing spaces. Ignore these * when checking for known vendor names. */ - len = strlen(v); + len = v ? strlen(v) : 0; while (len && v[len - 1] == ' ') len--; |