diff options
| author | Joakim Verona | 2013-03-05 00:03:54 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-05 00:03:54 +0100 |
| commit | 15cb771195328913a9c24467db7e373acb92a769 (patch) | |
| tree | bcc11058820845725694eae8c1ce0370fb6f09a5 /src | |
| parent | f5bf5325b501b788df2afc4bd2ef3022d2c08b6d (diff) | |
| parent | e0bc0f33bd68092b5b3c083fb485a35556a5b73b (diff) | |
| download | emacs-15cb771195328913a9c24467db7e373acb92a769.tar.gz emacs-15cb771195328913a9c24467db7e373acb92a769.zip | |
auto upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/font.c | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 2 | ||||
| -rw-r--r-- | src/image.c | 10 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 2 |
5 files changed, 21 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index adff00f7189..08fd647074f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-03-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix misuse of ImageMagick that caused core dump (Bug#13846). | ||
| 4 | * image.c (imagemagick_load_image): Calculate height and width | ||
| 5 | after flattening the image, not before. | ||
| 6 | |||
| 7 | 2013-03-04 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 8 | |||
| 9 | * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW. | ||
| 10 | * ftfont.c (ftfont_shape_by_flt): Likewise. | ||
| 11 | * w32uniscribe.c (uniscribe_shape): Likewise. | ||
| 12 | |||
| 1 | 2013-03-02 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2013-03-02 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 14 | ||
| 3 | The lock for FILE is now .#FILE or .#-FILE (Bug#13807). | 15 | The lock for FILE is now .#FILE or .#-FILE (Bug#13807). |
| @@ -208,6 +220,7 @@ | |||
| 208 | of dumping Emacs. Explain why. | 220 | of dumping Emacs. Explain why. |
| 209 | 221 | ||
| 210 | 2013-02-20 Dmitry Antipov <dmantipov@yandex.ru> | 222 | 2013-02-20 Dmitry Antipov <dmantipov@yandex.ru> |
| 223 | |||
| 211 | * search.c (find_newline): Return byte position in bytepos. | 224 | * search.c (find_newline): Return byte position in bytepos. |
| 212 | Adjust comment. | 225 | Adjust comment. |
| 213 | (find_next_newline_no_quit, find_before_next_newline): | 226 | (find_next_newline_no_quit, find_before_next_newline): |
diff --git a/src/font.c b/src/font.c index e2ea7262397..c6707cf31a8 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -4716,7 +4716,7 @@ the corresponding element is nil. */) | |||
| 4716 | code = font->driver->encode_char (font, c); | 4716 | code = font->driver->encode_char (font, c); |
| 4717 | if (code == FONT_INVALID_CODE) | 4717 | if (code == FONT_INVALID_CODE) |
| 4718 | continue; | 4718 | continue; |
| 4719 | g = Fmake_vector (make_number (LGLYPH_SIZE), Qnil); | 4719 | g = LGLYPH_NEW (); |
| 4720 | LGLYPH_SET_FROM (g, i); | 4720 | LGLYPH_SET_FROM (g, i); |
| 4721 | LGLYPH_SET_TO (g, i); | 4721 | LGLYPH_SET_TO (g, i); |
| 4722 | LGLYPH_SET_CHAR (g, c); | 4722 | LGLYPH_SET_CHAR (g, c); |
diff --git a/src/ftfont.c b/src/ftfont.c index 1fb1b574a1c..867e25a7a25 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2541,7 +2541,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | |||
| 2541 | 2541 | ||
| 2542 | if (NILP (lglyph)) | 2542 | if (NILP (lglyph)) |
| 2543 | { | 2543 | { |
| 2544 | lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil); | 2544 | lglyph = LGLYPH_NEW (); |
| 2545 | LGSTRING_SET_GLYPH (lgstring, i, lglyph); | 2545 | LGSTRING_SET_GLYPH (lgstring, i, lglyph); |
| 2546 | } | 2546 | } |
| 2547 | LGLYPH_SET_FROM (lglyph, g->from); | 2547 | LGLYPH_SET_FROM (lglyph, g->from); |
diff --git a/src/image.c b/src/image.c index 726b65d7338..2d4e7e731ad 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7792,11 +7792,6 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7792 | } | 7792 | } |
| 7793 | } | 7793 | } |
| 7794 | 7794 | ||
| 7795 | /* Finally we are done manipulating the image. Figure out the | ||
| 7796 | resulting width/height and transfer ownership to Emacs. */ | ||
| 7797 | height = MagickGetImageHeight (image_wand); | ||
| 7798 | width = MagickGetImageWidth (image_wand); | ||
| 7799 | |||
| 7800 | /* Set the canvas background color to the frame or specified | 7795 | /* Set the canvas background color to the frame or specified |
| 7801 | background, and flatten the image. Note: as of ImageMagick | 7796 | background, and flatten the image. Note: as of ImageMagick |
| 7802 | 6.6.0, SVG image transparency is not handled properly | 7797 | 6.6.0, SVG image transparency is not handled properly |
| @@ -7813,6 +7808,11 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7813 | image_wand = new_wand; | 7808 | image_wand = new_wand; |
| 7814 | } | 7809 | } |
| 7815 | 7810 | ||
| 7811 | /* Finally we are done manipulating the image. Figure out the | ||
| 7812 | resulting width/height and transfer ownership to Emacs. */ | ||
| 7813 | height = MagickGetImageHeight (image_wand); | ||
| 7814 | width = MagickGetImageWidth (image_wand); | ||
| 7815 | |||
| 7816 | if (! (width <= INT_MAX && height <= INT_MAX | 7816 | if (! (width <= INT_MAX && height <= INT_MAX |
| 7817 | && check_image_size (f, width, height))) | 7817 | && check_image_size (f, width, height))) |
| 7818 | { | 7818 | { |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 56931adfac5..c153c8f3565 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -333,7 +333,7 @@ uniscribe_shape (Lisp_Object lgstring) | |||
| 333 | 333 | ||
| 334 | if (NILP (lglyph)) | 334 | if (NILP (lglyph)) |
| 335 | { | 335 | { |
| 336 | lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil); | 336 | lglyph = LGLYPH_NEW (); |
| 337 | LGSTRING_SET_GLYPH (lgstring, lglyph_index, lglyph); | 337 | LGSTRING_SET_GLYPH (lgstring, lglyph_index, lglyph); |
| 338 | } | 338 | } |
| 339 | /* Copy to a 32-bit data type to shut up the | 339 | /* Copy to a 32-bit data type to shut up the |