Commit e52799d5 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keyboard.c: replace malloc/strcpy by str(n)dup

parent 718c5b9f
......@@ -900,16 +900,10 @@ XkbError:
}
free_model = 1;
model = malloc(i + 1);
strncpy(model, nxagentKeyboard, i);
model[i] = '\0';
model = strndup(nxagentKeyboard, i);
free_layout = 1;
layout = malloc(strlen(&nxagentKeyboard[i + 1]) + 1);
strcpy(layout, &nxagentKeyboard[i + 1]);
layout = strdup(&nxagentKeyboard[i + 1]);
/*
* There is no description for pc105 on Solaris.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment