1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 15:52:00 -08:00

* font.c, gtkutil.c: Include <float.h>.

This commit is contained in:
Paul Eggert 2011-08-29 13:57:42 -07:00
parent 1a091fbc08
commit 6e1a67fbe9
3 changed files with 6 additions and 2 deletions

View file

@ -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 <float.h>, 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 <float.h>, 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.

View file

@ -21,6 +21,7 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <float.h>
#include <stdio.h>
#include <ctype.h>
#include <setjmp.h>

View file

@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#ifdef USE_GTK
#include <float.h>
#include <signal.h>
#include <stdio.h>
#include <setjmp.h>