[PATCH 2/4] ProcRRCreateMode: fix use of uninitialised bytes valgrind error.
Ander Conselvan de Oliveira
ander.conselvan-de-oliveira at nokia.com
Tue Feb 8 01:10:09 PST 2011
==543== Syscall param writev(vector[...]) points to uninitialised byte(s)
==543== at 0x4AB7154: writev (writev.c:51)
==543== by 0x8935B: _XSERVTransWritev (Xtrans.c:912)
==543== by 0x6C55F: FlushClient (io.c:924)
==543== by 0x6D013: FlushAllOutput (io.c:668)
==543== by 0x27A83: Dispatch (dispatch.c:453)
==543== by 0x205B7: main (main.c:291)
==543== Address 0x556dc8c is 12 bytes inside a block of size 4,096 alloc'd
==543== at 0x48334A4: calloc (vg_replace_malloc.c:467)
==543== by 0x6CE37: WriteToClient (io.c:1065)
==543== by 0x223A7: ProcEstablishConnection (dispatch.c:3685)
==543== by 0x27B7B: Dispatch (dispatch.c:432)
==543== by 0x205B7: main (main.c:291)
==543== Uninitialised value was created by a stack allocation
==543== at 0xA3350: ProcRRCreateMode (rrmode.c:289)
---
randr/rrmode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 5ffa400..d7560dc 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -288,7 +288,7 @@ int
ProcRRCreateMode (ClientPtr client)
{
REQUEST(xRRCreateModeReq);
- xRRCreateModeReply rep;
+ xRRCreateModeReply rep = {0};
WindowPtr pWin;
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
--
1.7.0.4
More information about the xorg-devel
mailing list