Commit 9271a196 authored by Mario Limonciello's avatar Mario Limonciello
Browse files

dell: catch invalid dock component requests

Test if g_strrstr returns NULL, as this means the string was
modified and other requests predicated on this will fail miserably.
parent b6778a35
......@@ -316,9 +316,14 @@ fu_plugin_dell_device_added_cb (GUsbContext *ctx,
dock_info->components[i].description,
dock_info->components[i].fw_version);
query_str = g_strrstr (dock_info->components[i].description,
"Query ") + 6;
if (!fu_plugin_dell_match_dock_component (query_str, &guid_raw,
&component_name)) {
"Query ");
if (query_str == NULL) {
g_debug ("Invalid dock component request");
return;
}
if (!fu_plugin_dell_match_dock_component (query_str + 6,
&guid_raw,
&component_name)) {
g_debug ("Unable to match dock component %s",
query_str);
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment