[mutter] input-mapper: Don't loop infinitely in EDID matching
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] input-mapper: Don't loop infinitely in EDID matching
- Date: Mon, 11 Feb 2019 14:51:46 +0000 (UTC)
commit 29ed84e9212e0e35a5a0e09636c644244c49cfb1
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Mon Feb 11 13:33:01 2019 +0100
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
src/backends/meta-input-mapper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c
index 013c2a427..2be6cc65b 100644
--- a/src/backends/meta-input-mapper.c
+++ b/src/backends/meta-input-mapper.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]