aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-12-18 00:17:51 +0100
committerUlrich Sibiller <uli42@gmx.de>2018-12-18 00:17:51 +0100
commit44c59e12dc3fb509d3d237cbc782cc44dfa30f4e (patch)
tree63a72a6bbe88d32d866051cc4d07a4e955e63f38 /nx-X11/programs
parent5b0bf752a0c5a224ddf42cccdcb37534357c08ab (diff)
downloadnx-libs-44c59e12dc3fb509d3d237cbc782cc44dfa30f4e.tar.gz
nx-libs-44c59e12dc3fb509d3d237cbc782cc44dfa30f4e.tar.bz2
nx-libs-44c59e12dc3fb509d3d237cbc782cc44dfa30f4e.zip
Fix uninitialized bytes
Fixes this valgrind finding ==16977== Warning: invalid file descriptor -1 in syscall close() ==16977== Conditional jump or move depends on uninitialised value(s) ==16977== at 0x544B6B: XkbSendNewKeyboardNotify (xkbEvents.c:62) ==16977== by 0x540481: ProcXkbGetKbdByName (xkb.c:5330) ==16977== by 0x4341C5: Dispatch (NXdispatch.c:482) ==16977== by 0x40EB02: main (main.c:353) ==16977== Uninitialised value was created by a heap allocation ==16977== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16977== by 0x431BD7: NextAvailableClient (dispatch.c:3719) ==16977== by 0x47B297: AllocNewConnection (connection.c:821) ==16977== by 0x47B297: EstablishNewConnections (connection.c:910) ==16977== by 0x463DFE: ProcessWorkQueue (dixutils.c:541) ==16977== by 0x47635E: WaitForSomething (WaitFor.c:213) ==16977== by 0x434089: Dispatch (NXdispatch.c:360) ==16977== by 0x40EB02: main (main.c:353)
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 3c791465e..5c4e54c73 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -3716,7 +3716,7 @@ ClientPtr NextAvailableClient(void * ospriv)
i = nextFreeClientID;
if (i == MAXCLIENTS)
return (ClientPtr)NULL;
- clients[i] = client = (ClientPtr)malloc(totalClientSize);
+ clients[i] = client = (ClientPtr)calloc(1,totalClientSize);
if (!client)
return (ClientPtr)NULL;
InitClient(client, i, ospriv);