From bbeee4fd14a664bdf3b305fb7a959583db52241f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Mon, 10 Jan 2011 16:37:22 +0200 Subject: keyBind: Use Xcalloc to initialize allocated _XKeytrans MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using uninitialized value "p->modifiers" Small fix by using Xcalloc instead of Xmalloc Signed-off-by: Erkki Seppälä Reviewed-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/KeyBind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/lib/X11') 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))) && -- cgit v1.2.3