Commit bbeee4fd authored by Erkki Seppälä's avatar Erkki Seppälä Committed by Ulrich Sibiller

keyBind: Use Xcalloc to initialize allocated _XKeytrans

Using uninitialized value "p->modifiers" Small fix by using Xcalloc instead of Xmalloc Signed-off-by: 's avatarErkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 2618bd3f
......@@ -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))) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment