From 6e1a67fbe915e6fdc1d63a8e6c434aa79e4e7fb4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 29 Aug 2011 13:57:42 -0700 Subject: [PATCH] * font.c, gtkutil.c: Include . --- src/ChangeLog | 6 ++++-- src/font.c | 1 + src/gtkutil.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9f86c42d43b..1de15f4796e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -39,7 +39,8 @@ * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name; use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues. - * font.c (font_unparse_xlfd): Don't blindly alloca long strings. + * font.c: Include , for DBL_MAX_10_EXP. + (font_unparse_xlfd): Don't blindly alloca long strings. Don't assume XINT result fits in int, or that XFLOAT_DATA * 10 fits in int, when using sprintf. Use single snprintf to count length of string rather than counting it via multiple sprintfs; @@ -62,7 +63,8 @@ use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does not fit in int. - * gtkutil.c (xg_check_special_colors, xg_set_geometry): + * gtkutil.c: Include , for DBL_MAX_10_EXP. + (xg_check_special_colors, xg_set_geometry): Make sprintf buffers a bit bigger, to avoid potential buffer overrun. * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA. diff --git a/src/font.c b/src/font.c index cc5939982d3..1609a2cc9ff 100644 --- a/src/font.c +++ b/src/font.c @@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include +#include #include #include #include diff --git a/src/gtkutil.c b/src/gtkutil.c index 5f23d597329..c154797735e 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see . */ #include #ifdef USE_GTK +#include #include #include #include -- 2.39.2