]> git.eshelyaron.com Git - emacs.git/commit
Avoid infloops in font_open_entity
authorEli Zaretskii <eliz@gnu.org>
Sat, 5 May 2018 08:52:29 +0000 (11:52 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 2 Jun 2018 09:30:30 +0000 (12:30 +0300)
commite96245a5497ecbc6c58740a6b6bd1f848a44b26c
tree8f132637a478bf3c50402d92355d1eb6089307c7
parent3a06e7245703f58aaee5c50cfaa410458614efa0
Avoid infloops in font_open_entity

* src/font.c (font_open_entity): Fail after 15 iterations through
the loop that looks for a font whose average_width and height are
both positive.  This avoids infinite loops for fonts that, e.g.,
report average_width of zero for any possible size we try.
(Bug#31316)

(cherry picked from commit e2879c1f837059335af89022b2a9ac9bc861e96d)
src/font.c