bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref

The relationship of info->def_length to strlen(info->def_string) should
only be tested if info->def_string is not NULL.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I125a8d5da8b8f23401604c2ab32c2ed17956b74c
diff --git a/src/bios_table.c b/src/bios_table.c
index a191a42..436f3e6 100644
--- a/src/bios_table.c
+++ b/src/bios_table.c
@@ -391,7 +391,7 @@
 		set_errmsg(errmsg, "Wrong StringType");
 		return PLDM_ERROR_INVALID_DATA;
 	}
-	if (info->def_length != strlen(info->def_string)) {
+	if (info->def_string && info->def_length != strlen(info->def_string)) {
 		set_errmsg(errmsg, "Length of DefaultString should be equal to "
 				   "DefaultStringLength");
 		return PLDM_ERROR_INVALID_DATA;