diff options
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r-- | xorg-server/xkb/xkbUtils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c index 286fab073..ab433a800 100644 --- a/xorg-server/xkb/xkbUtils.c +++ b/xorg-server/xkb/xkbUtils.c @@ -1977,7 +1977,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) /* font */
if (src->geom->label_font) {
if (!dst->geom->label_font) {
- tmp = malloc(strlen(src->geom->label_font));
+ tmp = malloc(strlen(src->geom->label_font) + 1);
if (!tmp)
return FALSE;
dst->geom->label_font = tmp;
@@ -1985,7 +1985,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) else if (strlen(src->geom->label_font) !=
strlen(dst->geom->label_font)) {
tmp = realloc(dst->geom->label_font,
- strlen(src->geom->label_font));
+ strlen(src->geom->label_font) + 1);
if (!tmp)
return FALSE;
dst->geom->label_font = tmp;
|