aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/xkbfmisc.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 22:44:58 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 22:44:58 +0100
commit05aabb4e6f45bcb2c951ec04026f9d7bce7335b3 (patch)
tree7eb1bb1a0e4633e77edf9d3d8e3829849303f1cd /nx-X11/programs/Xserver/xkb/xkbfmisc.c
parent96e2556031c8aff62a4650b9cfb814991f5240e1 (diff)
parent06bb154df0a4d6e35885bce6a63057bd8f8636e8 (diff)
downloadnx-libs-05aabb4e6f45bcb2c951ec04026f9d7bce7335b3.tar.gz
nx-libs-05aabb4e6f45bcb2c951ec04026f9d7bce7335b3.tar.bz2
nx-libs-05aabb4e6f45bcb2c951ec04026f9d7bce7335b3.zip
Merge branch 'uli42-pr/fix_validatestring' into 3.6.x
Attributes GH PR #359: https://github.com/ArcticaProject/nx-libs/pull/359
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkbfmisc.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbfmisc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbfmisc.c b/nx-X11/programs/Xserver/xkb/xkbfmisc.c
index 43d55aa47..6545a2879 100644
--- a/nx-X11/programs/Xserver/xkb/xkbfmisc.c
+++ b/nx-X11/programs/Xserver/xkb/xkbfmisc.c
@@ -265,7 +265,8 @@ XkbWriteXKBKeymapForNames( FILE * file,
unsigned want,
unsigned need)
{
-char * name,*tmp;
+char * name;
+const char * tmp;
unsigned complete;
XkbNamesPtr old_names;
int multi_section;
@@ -333,8 +334,8 @@ XkbFileInfo finfo;
if ((xkb!=NULL) && (old_names!=NULL)) {
if (wantNames&XkmTypesMask) {
if (old_names->types!=None) {
- tmp= XkbAtomGetString(dpy,old_names->types);
- names->types= _XkbDupString(tmp);
+ tmp= NameForAtom(old_names->types);
+ names->types= Xstrdup(tmp);
}
else {
wantDflts|= XkmTypesMask;
@@ -343,8 +344,8 @@ XkbFileInfo finfo;
}
if (wantNames&XkmCompatMapMask) {
if (old_names->compat!=None) {
- tmp= XkbAtomGetString(dpy,old_names->compat);
- names->compat= _XkbDupString(tmp);
+ tmp= NameForAtom(old_names->compat);
+ names->compat= Xstrdup(tmp);
}
else wantDflts|= XkmCompatMapMask;
complete|= XkmCompatMapMask;
@@ -352,14 +353,14 @@ XkbFileInfo finfo;
if (wantNames&XkmSymbolsMask) {
if (old_names->symbols==None)
return False;
- tmp= XkbAtomGetString(dpy,old_names->symbols);
- names->symbols= _XkbDupString(tmp);
+ tmp= NameForAtom(old_names->symbols);
+ names->symbols= Xstrdup(tmp);
complete|= XkmSymbolsMask;
}
if (wantNames&XkmKeyNamesMask) {
if (old_names->keycodes!=None) {
- tmp= XkbAtomGetString(dpy,old_names->keycodes);
- names->keycodes= _XkbDupString(tmp);
+ tmp= NameForAtom(old_names->keycodes);
+ names->keycodes= Xstrdup(tmp);
}
else wantDflts|= XkmKeyNamesMask;
complete|= XkmKeyNamesMask;
@@ -367,8 +368,8 @@ XkbFileInfo finfo;
if (wantNames&XkmGeometryMask) {
if (old_names->geometry==None)
return False;
- tmp= XkbAtomGetString(dpy,old_names->geometry);
- names->geometry= _XkbDupString(tmp);
+ tmp= NameForAtom(old_names->geometry);
+ names->geometry= Xstrdup(tmp);
complete|= XkmGeometryMask;
wantNames&= ~XkmGeometryMask;
}