diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-06-19 07:21:07 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-06-19 07:21:07 +0400 |
commit | 52a6194ff6b327bcd520dc308f346d01e456b0b0 (patch) | |
tree | 8e8186ba4542f2943591b3cee74a10f49149a7cb | |
parent | bc2fb4fdad8cc54a7fe47bd76580959697219846 (diff) | |
download | emacs-52a6194ff6b327bcd520dc308f346d01e456b0b0.tar.gz |
* font.c (font_make_object): Avoid dangling pointer which may
crash GC (Bug#17771).
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/font.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fb0cc471599..6869116416a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-06-19 Dmitry Antipov <dmantipov@yandex.ru> + + * font.c (font_make_object): Avoid dangling pointer which may + crash GC (Bug#17771). + 2014-06-18 Eli Zaretskii <eliz@gnu.org> * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the diff --git a/src/font.c b/src/font.c index b49664b5f31..afa138003f2 100644 --- a/src/font.c +++ b/src/font.c @@ -207,6 +207,9 @@ font_make_object (int size, Lisp_Object entity, int pixelsize) = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT); int i; + /* GC can happen before the driver is set up, + so avoid dangling pointer here (Bug#17771). */ + font->driver = NULL; XSETFONT (font_object, font); if (! NILP (entity)) |