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

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 29 17:29:11 PDT 2009


On Tue, Sep 29, 2009 at 01:44:24PM -0700, Keith Packard wrote:
> 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

Thanks for the patch and review, pushed to master.

Cheers,
  Peter


More information about the xorg-devel mailing list