From: Alex Gramiak <agrambot@gmail.com>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: Katsumi Yamaoka <yamaoka@jpl.org>,
35814@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#35814: 27.0.50; Broken font display
Date: Tue, 21 May 2019 15:19:29 -0600 [thread overview]
Message-ID: <877eajv732.fsf@gmail.com> (raw)
In-Reply-To: <vz1y32zr56e.fsf@gmail.com> (Andy Moreton's message of "Tue, 21 May 2019 20:14:17 +0100")
Andy Moreton <andrewjmoreton@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.
next prev parent reply other threads:[~2019-05-21 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 21:33 bug#35814: 27.0.50; Broken font display Juri Linkov
2019-05-21 6:01 ` Alex Gramiak
2019-05-21 8:03 ` Katsumi Yamaoka
2019-05-21 19:14 ` Andy Moreton
2019-05-21 21:19 ` Alex Gramiak [this message]
2019-05-21 21:42 ` Juri Linkov
2019-05-21 19:41 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877eajv732.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=35814@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
--cc=juri@linkov.net \
--cc=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).