aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-07-18 23:09:32 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-09 15:31:57 +0100
commit018b2d0c63505960ba82b4ca1fac7852ee3d5115 (patch)
tree296c9c71e5da0261aceed4ab51b9b40e1235019b /nx-X11
parent59524cd062f87874f11d566a32836a97e8426382 (diff)
downloadnx-libs-018b2d0c63505960ba82b4ca1fac7852ee3d5115.tar.gz
nx-libs-018b2d0c63505960ba82b4ca1fac7852ee3d5115.tar.bz2
nx-libs-018b2d0c63505960ba82b4ca1fac7852ee3d5115.zip
XkbSendNames: fix use of uninitialised bytes valgrind error.
Backported-to-nx-by: Ulrich Sibiller <uli42@gmx.de> commit 8a34d7a8532c7ca013e67307f3baf200167abb92 Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:11 2011 +0200 XkbSendNames: fix use of uninitialised bytes valgrind error. ==537== Syscall param writev(vector[...]) points to uninitialised byte(s) ==537== at 0x4AB7154: writev (writev.c:51) ==537== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) ==537== by 0x6C55F: FlushClient (io.c:924) ==537== by 0x6CCF3: WriteToClient (io.c:846) ==537== by 0xD51D3: XkbSendNames (xkb.c:3765) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Address 0x55899f2 is 154 bytes inside a block of size 1,896 alloc'd ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Uninitialised value was created by a heap allocation ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c
index 3de41c086..f601f04b7 100644
--- a/nx-X11/programs/Xserver/xkb/xkb.c
+++ b/nx-X11/programs/Xserver/xkb/xkb.c
@@ -3203,7 +3203,7 @@ char * desc;
swapl(&rep->indicators);
}
- start = desc = (char *)malloc(length);
+ start = desc = (char *)calloc(1, length);
if ( !start )
return BadAlloc;
if (xkb->names) {