Bug#354577: Patch (attempt #2)
On Tue, Feb 28, 2006 at 08:04:04PM +0300, Andrew ``Bass'' Shcheglov wrote:
> On 2/28/06, Eugene Konev <ejka@imfi.kspu.ru> wrote:
> > This patch is incorrect, as ListFonts request can only take CARD16 as
> > maxfonts.
>
> Probably I'm missing the point, since I'm not a C or X11 guru, but
> XListFonts(...), ListFonts(...), MakeFontNamesRecord(...) calls and
> _LFWIstate, _FontNames structures operate int (or unsigned int)
> arguments/fields (for maxnames/size), not CARD16...
>
> And the patched version of xfontsel works well for me.
>
> Where am I wrong?
Eugene's talking about the protocol request on the wire, where it's only
a CARD16 (i.e. 16-bit integer). Since you can conceivably have a 32-bit
little-endian client on a 64-bit big-endian server, X deals in 8, 16 and
32-bit integers on the wire, and in this case, maxfonts on the wire is
only 16 bits, so it'll be getting silently clipped.
Reply to: