Page MenuHomeFreeBSD

D35403.id106637.diff
No OneTemporary

D35403.id106637.diff

diff --git a/sys/compat/linuxkpi/common/src/linux_dmi.c b/sys/compat/linuxkpi/common/src/linux_dmi.c
--- a/sys/compat/linuxkpi/common/src/linux_dmi.c
+++ b/sys/compat/linuxkpi/common/src/linux_dmi.c
@@ -77,20 +77,25 @@
static bool
linux_dmi_matches(const struct dmi_system_id *dsi)
{
+ enum dmi_field slot;
int i;
for (i = 0; i < nitems(dsi->matches); i++) {
- if (dsi->matches[i].slot == DMI_NONE)
+ slot = dsi->matches[i].slot;
+ if (slot == DMI_NONE)
break;
+ if (slot >= DMI_STRING_MAX ||
+ dmi_data[slot] == NULL)
+ continue;
if (dsi->matches[i].exact_match) {
- return (dmi_match(dsi->matches[i].slot,
- dsi->matches[i].substr));
- } else {
- return (strstr(dmi_data[dsi->matches[i].slot],
- dsi->matches[i].substr) != NULL);
+ if (dmi_match(slot, dsi->matches[i].substr))
+ continue;
+ } else if (strstr(dmi_data[slot],
+ dsi->matches[i].substr) != NULL) {
+ continue;
}
+ return (false);
}
-
return (true);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 26, 12:47 PM (7 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32184834
Default Alt Text
D35403.id106637.diff (984 B)

Event Timeline