aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2011-01-10 16:37:22 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:25 +0200
commitbbeee4fd14a664bdf3b305fb7a959583db52241f (patch)
tree8278961eabad7bcb33715f915b6c4356afe46e06 /nx-X11
parent2618bd3fc7274be77d7b2cf87018dc21c779bdfa (diff)
downloadnx-libs-bbeee4fd14a664bdf3b305fb7a959583db52241f.tar.gz
nx-libs-bbeee4fd14a664bdf3b305fb7a959583db52241f.tar.bz2
nx-libs-bbeee4fd14a664bdf3b305fb7a959583db52241f.zip
keyBind: Use Xcalloc to initialize allocated _XKeytrans
Using uninitialized value "p->modifiers" Small fix by using Xcalloc instead of Xmalloc Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/KeyBind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c
index c7f17c4da..bd29cc782 100644
--- a/nx-X11/lib/X11/KeyBind.c
+++ b/nx-X11/lib/X11/KeyBind.c
@@ -996,7 +996,7 @@ XRebindKeysym (
tmp = dpy->key_bindings;
nb = sizeof(KeySym) * nm;
- if ((! (p = (struct _XKeytrans *) Xmalloc( sizeof(struct _XKeytrans)))) ||
+ if ((! (p = (struct _XKeytrans *) Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) &&
(nbytes > 0)) ||
((! (p->modifiers = (KeySym *) Xmalloc( (unsigned) nb))) &&