[PATCH] dix: In MakeWindowOptional: Fix crash if parentOptional->cursor is NULL.

Keith Packard keithp at keithp.com
Tue Sep 29 13:44:24 PDT 2009


Excerpts from Kim Woelders's message of Tue Sep 29 11:58:36 -0700 2009:

>From 2da355de4f0c0a9a4ca52b1253afed9486481411 Mon Sep 17 00:00:00 2001
From: Kim Woelders <kim at woelders.dk>
Date: Tue, 29 Sep 2009 20:31:45 +0200
Subject: [PATCH] dix: Fix potential memory corruption in doListFontsWithInfo.


Signed-off-by: Kim Woelders <kim at woelders.dk>
Reviewed-by: Keith Packard <keithp at keithp.com>

---
 dix/dixfonts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index d0a46c7..329318d 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1046,7 +1046,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
             err = AllocError;
             break;
         }
-        memset(reply + c->length, 0, length - c->length);
+        memset((char*)reply + c->length, 0, length - c->length);
         c->reply = reply;
         c->length = length;
         }
--
1.6.4.4


-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090929/fe100488/attachment.pgp 


More information about the xorg-devel mailing list