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 https://gitlab.gnome.org/GNOME/mutter/issues/459
This commit is contained in:
Marco Trevisan (Treviño) 2019-02-11 13:33:01 +01:00
parent d587fc1ef4
commit 29ed84e921

View File

@ -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)
{