[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#354577: Patch (attempt #2)



At Tue, 28 Feb 2006 18:15:16 +0300,
Andrew ``Bass'' Shcheglov wrote:
> 
> diff -ur xc.orig/programs/xfontsel/xfontsel.c xc/programs/xfontsel/xfontsel.c
> --- xc.orig/programs/xfontsel/xfontsel.c	2004-04-04 02:38:55.000000000 +0400
> +++ xc/programs/xfontsel/xfontsel.c	2006-02-28 17:51:11.000000000 +0300
> @@ -505,7 +505,7 @@
>      int work_priority = 0;
>  
>      fontNames = parseRec->fontNames =
> -	XListFonts(dpy, AppRes.pattern, 32767, &numFonts);
> +	XListFonts(dpy, AppRes.pattern, (int) ((((long) ((unsigned) -1)) + 1) / 2 - 1), &numFonts);
>  
>      fonts = (FontValues*)XtMalloc( numFonts*sizeof(FontValues) );
>      fontInSet = (Boolean*)XtMalloc( numFonts*sizeof(Boolean) );

This patch is incorrect, as ListFonts request can only take CARD16 as
maxfonts. 



Reply to: