bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35814: 27.0.50; Broken font display


From: Alex Gramiak
Subject: bug#35814: 27.0.50; Broken font display
Date: Tue, 21 May 2019 15:19:29 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Andy Moreton <address@hidden> writes:

> Alex, at the end of xfont_draw() in xfont.c, we now have:
>
>       else
>         {
>           const unsigned code = s->char2b[from];
>           const XChar2b char2b = { .byte1 = code >> 8,
>                                    .byte2 = code & 0xFF };
>           XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
>                               gc, x, y, &char2b, len);
>         }
>
> and:
>       else
>         {
>           const unsigned code = s->char2b[from];
>           const XChar2b char2b = { .byte1 = code >> 8,
>                                    .byte2 = code & 0xFF };
>           XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
>                          gc, x, y, &char2b, len);
>         }
>
> Both of these pass "len", but use a single XChar2b on the stack, so
> this causes an overrun (and draws random stack contents).

Wow, sorry, that was a bad mistake. I've applied commit 5a024b72c to
master; can those who experience the bug affirm that it's been fixed?

It appears that I only tested with fonts that make s->padding_p true,
and I can't seem to find a font on my system that doesn't.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]