diff options
| author | Paul Eggert | 2011-08-29 11:48:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-29 11:48:24 -0700 |
| commit | c57b67fcf07e10378fbb11cf8c6aecded43d1736 (patch) | |
| tree | 47dbbc3b37d35f4b8b0a2c039a1b04bb36d8410b | |
| parent | c21721cc3953732047ffdfe268764898f089f74b (diff) | |
| download | emacs-c57b67fcf07e10378fbb11cf8c6aecded43d1736.tar.gz emacs-c57b67fcf07e10378fbb11cf8c6aecded43d1736.zip | |
* fontset.c (num_auto_fontsets): Now printmax_t, not int.
(fontset_from_font): Print it.
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/fontset.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f94f9c4632f..a1af6127635 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -49,6 +49,9 @@ | |||
| 49 | (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not | 49 | (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not |
| 50 | sprintf, in case result does not fit in int. | 50 | sprintf, in case result does not fit in int. |
| 51 | 51 | ||
| 52 | * fontset.c (num_auto_fontsets): Now printmax_t, not int. | ||
| 53 | (fontset_from_font): Print it. | ||
| 54 | |||
| 52 | 2011-08-26 Paul Eggert <eggert@cs.ucla.edu> | 55 | 2011-08-26 Paul Eggert <eggert@cs.ucla.edu> |
| 53 | 56 | ||
| 54 | Integer and memory overflow issues (Bug#9196). | 57 | Integer and memory overflow issues (Bug#9196). |
diff --git a/src/fontset.c b/src/fontset.c index c8ae1e74848..74a25a1ca04 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1700,7 +1700,7 @@ FONT-SPEC is a vector, a cons, or a string. See the documentation of | |||
| 1700 | static Lisp_Object auto_fontset_alist; | 1700 | static Lisp_Object auto_fontset_alist; |
| 1701 | 1701 | ||
| 1702 | /* Number of automatically created fontsets. */ | 1702 | /* Number of automatically created fontsets. */ |
| 1703 | static int num_auto_fontsets; | 1703 | static printmax_t num_auto_fontsets; |
| 1704 | 1704 | ||
| 1705 | /* Retun a fontset synthesized from FONT-OBJECT. This is called from | 1705 | /* Retun a fontset synthesized from FONT-OBJECT. This is called from |
| 1706 | x_new_font when FONT-OBJECT is used for the default ASCII font of a | 1706 | x_new_font when FONT-OBJECT is used for the default ASCII font of a |
| @@ -1727,9 +1727,9 @@ fontset_from_font (Lisp_Object font_object) | |||
| 1727 | alias = intern ("fontset-startup"); | 1727 | alias = intern ("fontset-startup"); |
| 1728 | else | 1728 | else |
| 1729 | { | 1729 | { |
| 1730 | char temp[32]; | 1730 | char temp[sizeof "fontset-auto" + INT_STRLEN_BOUND (printmax_t)]; |
| 1731 | 1731 | ||
| 1732 | sprintf (temp, "fontset-auto%d", num_auto_fontsets - 1); | 1732 | sprintf (temp, "fontset-auto%"pMd, num_auto_fontsets - 1); |
| 1733 | alias = intern (temp); | 1733 | alias = intern (temp); |
| 1734 | } | 1734 | } |
| 1735 | fontset_spec = copy_font_spec (font_spec); | 1735 | fontset_spec = copy_font_spec (font_spec); |