patches/xf86-input-synaptics-02-synclient.diff
author trisk
Fri, 16 Oct 2009 03:41:48 +0000
changeset 2212 82f60d1f7c90
parent 1720 8131cabd4fe0
permissions -rw-r--r--
2009-10-15 Albert Lee <[email protected]> * SFEctrlproxy.spec: Add patch3, patch4 * SFExorg-input-wacom.spec: Add SUNWncurses dependency for wacdump, xidump. * base-specs/xf86-input-synaptics.spec: Bump to 1.1.99.1. Drop patch3. * patches/ctrlproxy-03-daemon.diff: Support systems without daemon(). * patches/ctrlproxy-04-services.diff: Don't require system service port definitions. * patches/xf86-input-synaptics-01-alps-tap.diff, patches/xf86-input-synaptics-02-synclient.diff, patches/xf86-input-synaptics-05-solaris.diff: Update for 1.1.99.1.

--- 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;
 	    }