patches/xf86-input-synaptics-02-synclient.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2212 82f60d1f7c90
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

--- xf86-input-synaptics-1.1.3.orig/tools/synclient.c	2009-08-02 21:04:24.000000000 -0400
+++ xf86-input-synaptics-1.1.3/tools/synclient.c	2009-09-10 11:52:09.787558852 -0400
@@ -36,6 +36,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <stddef.h>
 #include <math.h>
 
@@ -258,9 +259,10 @@
     if (eqp) {
 	int j;
 	int found = 0;
-	*eqp = 0;
+	int len = eqp - cmd;
 	for (j = 0; params[j].name; j++) {
-	    if (strcasecmp(cmd, params[j].name) == 0) {
+	    if ((strncasecmp(cmd, params[j].name, len) == 0) &&
+	        (params[j].name[len] == '\0')) {
 		found = 1;
 		break;
 	    }