diff options
| author | Kenichi Handa | 2008-05-15 00:42:32 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-15 00:42:32 +0000 |
| commit | 5f2d79e0539460080b61c752fc943fee880e3367 (patch) | |
| tree | 90888abc0842d59a7e1cf22e013c92cd87d65aa1 /src | |
| parent | 4079589f63c958582a74e403e74217d6b9c6c7a2 (diff) | |
| download | emacs-5f2d79e0539460080b61c752fc943fee880e3367.tar.gz emacs-5f2d79e0539460080b61c752fc943fee880e3367.zip | |
(Fnew_fontset): Call font_unparse_xlfd with 256-byte
buffer. Check the return value of it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fontset.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b365794448e..a47d774c6a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-05-15 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * fontset.c (Fnew_fontset): Call font_unparse_xlfd with 256-byte | ||
| 4 | buffer. Check the return value of it. | ||
| 5 | |||
| 1 | 2008-05-14 Jason Rumney <jasonr@gnu.org> | 6 | 2008-05-14 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * w32term.c (w32_get_glyph_overhangs): Remove. | 8 | * w32term.c (w32_get_glyph_overhangs): Remove. |
diff --git a/src/fontset.c b/src/fontset.c index e02c833c6c5..82e5b4e65de 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1557,7 +1557,7 @@ FONT-SPEC is a vector, a cons, or a string. See the documentation of | |||
| 1557 | { | 1557 | { |
| 1558 | Lisp_Object font_spec = Ffont_spec (0, NULL); | 1558 | Lisp_Object font_spec = Ffont_spec (0, NULL); |
| 1559 | Lisp_Object short_name; | 1559 | Lisp_Object short_name; |
| 1560 | char *xlfd; | 1560 | char xlfd[256]; |
| 1561 | int len; | 1561 | int len; |
| 1562 | 1562 | ||
| 1563 | if (font_parse_xlfd (SDATA (name), font_spec) < 0) | 1563 | if (font_parse_xlfd (SDATA (name), font_spec) < 0) |
| @@ -1570,8 +1570,9 @@ FONT-SPEC is a vector, a cons, or a string. See the documentation of | |||
| 1570 | Vfontset_alias_alist); | 1570 | Vfontset_alias_alist); |
| 1571 | ASET (font_spec, FONT_REGISTRY_INDEX, Qiso8859_1); | 1571 | ASET (font_spec, FONT_REGISTRY_INDEX, Qiso8859_1); |
| 1572 | fontset = make_fontset (Qnil, name, Qnil); | 1572 | fontset = make_fontset (Qnil, name, Qnil); |
| 1573 | xlfd = alloca (SBYTES (name) + 1); | 1573 | len = font_unparse_xlfd (font_spec, 0, xlfd, 256); |
| 1574 | len = font_unparse_xlfd (font_spec, 0, xlfd, SBYTES (name) + 1); | 1574 | if (len < 0) |
| 1575 | error ("Invalid fontset name (perhaps too long): %s", SDATA (name)); | ||
| 1575 | FONTSET_ASCII (fontset) = make_unibyte_string (xlfd, len); | 1576 | FONTSET_ASCII (fontset) = make_unibyte_string (xlfd, len); |
| 1576 | } | 1577 | } |
| 1577 | else | 1578 | else |