Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154020920
D35403.id106637.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
984 B
Referenced Files
None
Subscribers
None
D35403.id106637.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D35403: LinuxKPI: Fix dmi_matches() function
Attached
Detach File
Event Timeline
Log In to Comment