summaryrefslogtreecommitdiff
path: root/dmioem.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmioem.c')
-rw-r--r--dmioem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmioem.c b/dmioem.c
index 217850e..180a95d 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -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--;