Commit 29ed84e9 authored by Marco Trevisan's avatar Marco Trevisan 🎺

input-mapper: Don't loop infinitely in EDID matching

Iterate over all the monitor product words to check for a partial matching on
EDID, otherwise we would hang inside an infinite while loop.

Fixes GNOME/mutter#459
parent d587fc1e
......@@ -249,12 +249,12 @@ match_edid (MetaMapperInputInfo *input,
}
else
{
int i;
char **split;
int i = 0;
split = g_strsplit (meta_monitor_get_product (monitor), " ", -1);
while (split[i])
for (i = 0; split[i]; i++)
{
if (strcasestr (dev_name, split[i]) != NULL)
{
......
Markdown is supported
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