This is a interface for servers with ABI < 14 (up to server 1.11).
The server version of it strdups the values, so we must do the same.

Otherwise the values assigned to the InputOption list in
wcmOptionDupConvert are freed during xf86OptionListFree().

That later causes a SIGABORT when NewInputDeviceRequest starts using
those options.

https://sourceforge.net/p/linuxwacom/bugs/233/

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/wcmValidateDevice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 65c6168..b3c9c61 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -345,8 +345,8 @@ input_option_new(InputOption *list, char *key, char *value)
        InputOption *new;
 
        new = calloc(1, sizeof(InputOption));
-       new->key = key;
-       new->value = value;
+       new->key = strdup(key);
+       new->value = strdup(value);
        new->next = list;
        return new;
 }
-- 
1.8.3.1


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to