From: Alan Third <alan@idiocy.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 51105@debbugs.gnu.org, "Daniel Martín" <mardani29@yahoo.es>
Subject: bug#51105: 29.0.50; Buffer overflow bug in ns_compute_glyph_string_overhangs
Date: Sat, 9 Oct 2021 14:57:40 +0100 [thread overview]
Message-ID: <YWGf1Bc+wFI3cixx@idiocy.org> (raw)
In-Reply-To: <83v926whih.fsf@gnu.org>
On Sat, Oct 09, 2021 at 02:43:18PM +0300, Eli Zaretskii wrote:
> > From: Daniel Martín <mardani29@yahoo.es>
> > Cc: 51105@debbugs.gnu.org
> > Date: Sat, 09 Oct 2021 12:06:36 +0200
> >
> > Now I think that the right thing to do may be to modify nsterm.m, switch
> > on the glyph type and, if the glyph type is COMPOSITE_GLYPH, call
> > composition_gstring_width to get the glyph metrics. Function
> > composition_gstring_width uses the values from fields s->cmp_from and
> > s->cmp_to, and would avoid the buffer overflow:
> >
> > (lldb) fr v s->cmp_from
> > (int) s->cmp_from = 6
> > (lldb) fr v s->cmp_to
> > (int) s->cmp_to = 7
> >
> > WDYT? I can prepare a patch of this type if you agree.
>
> SGTM, but I'd like to hear Alan's opinion as well, as I don't feel I
> know enough about the NS display backend.
I don't know much about this part of the code, but it sounds good to
me too.
--
Alan Third
next prev parent reply other threads:[~2021-10-09 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m17den59au.fsf.ref@yahoo.es>
2021-10-09 0:30 ` bug#51105: 29.0.50; Buffer overflow bug in ns_compute_glyph_string_overhangs Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-09 6:40 ` Eli Zaretskii
2021-10-09 10:06 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-09 11:43 ` Eli Zaretskii
2021-10-09 13:57 ` Alan Third [this message]
2021-10-09 19:35 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-09 19:41 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-05 2:39 ` Lars Ingebrigtsen
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=YWGf1Bc+wFI3cixx@idiocy.org \
--to=alan@idiocy.org \
--cc=51105@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mardani29@yahoo.es \
/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).