summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp-cstr.el
diff options
context:
space:
mode:
authorDaniel Martín <mardani29@yahoo.es>2021-10-09 21:10:20 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-05 03:39:19 +0100
commit48af19c1f06c2f3b20e4056bedf137a5e3c0e05e (patch)
tree3d3823cc7cfa371718deb81e1f8e6b0fc8e4689e /lisp/emacs-lisp/comp-cstr.el
parent3601e236792a4d3f87d17877926fea9d17c3a5a4 (diff)
downloademacs-48af19c1f06c2f3b20e4056bedf137a5e3c0e05e.tar.gz
emacs-48af19c1f06c2f3b20e4056bedf137a5e3c0e05e.tar.bz2
emacs-48af19c1f06c2f3b20e4056bedf137a5e3c0e05e.zip
Fix buffer overflow in ns_compute_glyph_string_overhangs
* src/nsterm.m (ns_compute_glyph_string_overhangs): When the first glyph of a glyph string is a composite glyph, `s->nchars' is 0, so "s->char2b + s->nchars - 1" dereferenced a position before buffer `s->char2b'. Instead, rewrite part of the function to distinguish between character glyphs and composite glyphs. For character glyphs, calculate the font metrics using the `text_extents' function, passing it the entire glyph string; for composite glyphs, call `composition_gstring_width'. (Bug#51105)
Diffstat (limited to 'lisp/emacs-lisp/comp-cstr.el')
0 files changed, 0 insertions, 0 deletions