From cb14924a2a5be21c8525ca70932ab8b5f0f99752 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Sep 2013 17:04:13 +1000 Subject: strdup the option key/values in our input_option_new 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 Acked-by: Ping Cheng --- 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; } -- cgit v1.2.3