GNU bug report logs -
#35814
27.0.50; Broken font display
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Mon, 20 May 2019 21:37:02 UTC
Severity: normal
Found in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Andy Moreton <andrewjmoreton <at> gmail.com> 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.
This bug report was last modified 5 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.