aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/maprules.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/xkb/maprules.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/xkb/maprules.c')
-rw-r--r--xorg-server/xkb/maprules.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xorg-server/xkb/maprules.c b/xorg-server/xkb/maprules.c
index f94089982..66800478c 100644
--- a/xorg-server/xkb/maprules.c
+++ b/xorg-server/xkb/maprules.c
@@ -200,7 +200,7 @@ Bool endOfFile,spacePending,slashPending,inComment;
#define PART_MASK 0x000F
#define COMPONENT_MASK 0x03F0
-static char * cname[MAX_WORDS] = {
+static const char * cname[MAX_WORDS] = {
"model", "layout", "variant", "option",
"keycodes", "symbols", "types", "compat", "geometry"
};
@@ -250,8 +250,7 @@ get_index(char *str, int *ndx)
*ndx = -1;
return end + 1;
}
- strncpy(ndx_buf, str, end - str);
- ndx_buf[end - str] = '\0';
+ strlcpy(ndx_buf, str, 1 + end - str);
*ndx = atoi(ndx_buf);
return end + 1;
}