]> git.eshelyaron.com Git - emacs.git/commit
Fix undefined behavior when fetching glyphs from the display vector.
authorPhilipp Stephani <phst@google.com>
Mon, 9 Nov 2020 21:14:39 +0000 (22:14 +0100)
committerPhilipp Stephani <phst@google.com>
Mon, 9 Nov 2020 21:14:39 +0000 (22:14 +0100)
commit109eb1e7e29455418b40ca00bf5dad3e61e5fc78
tree14f6331054999932a0e76e0b0200c35321fb8ea9
parent78e1646bf7bde8f00c196319f4803e98460d506a
Fix undefined behavior when fetching glyphs from the display vector.

You can trigger this rather obscure bug by enabling selective display
if the second glyph in its display vector has an invalid face.  For
example, evaluate

(set-display-table-slot standard-display-table
                        'selective-display [?A (?B . invalid)])

and then enable selective display.

* src/xdisp.c (next_element_from_display_vector): Check whether next
glyph code is valid before accessing it.
src/xdisp.c