aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/xkmread.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/xkmread.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/xkmread.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkmread.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c
index 1d8f6d772..71b65a4c0 100644
--- a/nx-X11/programs/Xserver/xkb/xkmread.c
+++ b/nx-X11/programs/Xserver/xkb/xkmread.c
@@ -58,19 +58,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
#define SEEK_SET 0
#endif
-char *
-_XkbDupString(char *str)
-{
-char *new;
-
- if (str==NULL)
- return NULL;
- new= (char *)_XkbCalloc(strlen(str)+1,sizeof(char));
- if (new)
- strcpy(new,str);
- return new;
-}
-
/***====================================================================***/
static XPointer
@@ -774,9 +761,9 @@ int nRead=0;
doodad->text.height= doodadWire.text.height;
doodad->text.color_ndx= doodadWire.text.color_ndx;
nRead+= XkmGetCountedString(file,buf,100);
- doodad->text.text= _XkbDupString(buf);
+ doodad->text.text= Xstrdup(buf);
nRead+= XkmGetCountedString(file,buf,100);
- doodad->text.font= _XkbDupString(buf);
+ doodad->text.font= Xstrdup(buf);
break;
case XkbIndicatorDoodad:
doodad->indicator.shape_ndx= doodadWire.indicator.shape_ndx;
@@ -788,7 +775,7 @@ int nRead=0;
doodad->logo.color_ndx= doodadWire.logo.color_ndx;
doodad->logo.shape_ndx= doodadWire.logo.shape_ndx;
nRead+= XkmGetCountedString(file,buf,100);
- doodad->logo.logo_name= _XkbDupString(buf);
+ doodad->logo.logo_name= Xstrdup(buf);
break;
default:
/* report error? */
@@ -952,7 +939,7 @@ XkbGeometrySizesRec sizes;
geom->width_mm= wireGeom.width_mm;
geom->height_mm= wireGeom.height_mm;
nRead+= XkmGetCountedString(file,buf,100);
- geom->label_font= _XkbDupString(buf);
+ geom->label_font= Xstrdup(buf);
if (wireGeom.num_properties>0) {
char val[1024];
for (i=0;i<wireGeom.num_properties;i++) {
@@ -1211,7 +1198,7 @@ char name[100];
return 0;
}
if (XkmGetCountedString(file,name,100)>0)
- return _XkbDupString(name);
+ return Xstrdup(name);
break;
default:
_XkbLibError(_XkbErrBadImplementation,