diff options
| author | Dmitry Antipov | 2014-06-19 07:21:07 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-06-19 07:21:07 +0400 |
| commit | 52a6194ff6b327bcd520dc308f346d01e456b0b0 (patch) | |
| tree | 8e8186ba4542f2943591b3cee74a10f49149a7cb /src | |
| parent | bc2fb4fdad8cc54a7fe47bd76580959697219846 (diff) | |
| download | emacs-52a6194ff6b327bcd520dc308f346d01e456b0b0.tar.gz emacs-52a6194ff6b327bcd520dc308f346d01e456b0b0.zip | |
* font.c (font_make_object): Avoid dangling pointer which may
crash GC (Bug#17771).
Diffstat (limited to 'src')
| -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 @@ | |||
| 1 | 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * font.c (font_make_object): Avoid dangling pointer which may | ||
| 4 | crash GC (Bug#17771). | ||
| 5 | |||
| 1 | 2014-06-18 Eli Zaretskii <eliz@gnu.org> | 6 | 2014-06-18 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the | 8 | * 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) | |||
| 207 | = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT); | 207 | = (struct font *) allocate_pseudovector (size, FONT_OBJECT_MAX, PVEC_FONT); |
| 208 | int i; | 208 | int i; |
| 209 | 209 | ||
| 210 | /* GC can happen before the driver is set up, | ||
| 211 | so avoid dangling pointer here (Bug#17771). */ | ||
| 212 | font->driver = NULL; | ||
| 210 | XSETFONT (font_object, font); | 213 | XSETFONT (font_object, font); |
| 211 | 214 | ||
| 212 | if (! NILP (entity)) | 215 | if (! NILP (entity)) |