- 2011-05-21 Paul Eggert <eggert@cs.ucla.edu>
-
+2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Rework Fformat to avoid integer overflow issues.
+ * editfns.c: Include <float.h> unconditionally, as it's everywhere
+ now (part of C89). Include <verify.h>.
+ (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
+ (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
+ (Fformat): Avoid the prepass trying to compute sizes; it was only
+ approximate and thus did not catch overflow reliably. Instead, walk
+ through the format just once, formatting and computing sizes as we go,
+ checking for integer overflow at every step, and allocating a larger
+ buffer as needed. Keep track separately whether the format is
+ multibyte. Keep only the most-recently calculated precision, rather
+ than them all. Record whether each argument has been converted to
+ string. Use EMACS_INT, not int, for byte and char and arg counts.
+ Support field widths and precisions larger than INT_MAX. Avoid
+ sprintf's undefined behavior with conversion specifications such as %#d
+ and %.0c. Fix bug with strchr succeeding on '\0' when looking for
+ flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
+ formatting out-of-range floating point numbers with int
+ formats. (Bug#8668)
+
+ * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
+
- 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
-
+ * data.c: Avoid integer truncation in expressions involving floats.
+ * data.c: Include <intprops.h>.
+ (arith_driver): When there's an integer overflow in an expression
+ involving floating point, convert the integers to floating point
+ so that the resulting value does not suffer from catastrophic
+ integer truncation. For example, on a 64-bit host (* 4
+ most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
+ Do not rely on undefined behavior after integer overflow.
+
+ merge count_size_as_multibyte, parse_str_to_multibyte
+ * character.c, character.h (count_size_as_multibyte):
+ Renamed from parse_str_to_multibyte; all uses changed.
+ Check for integer overflow.
+ * insdel.c, lisp.h (count_size_as_multibyte): Remove,
+ since it's now a duplicate of the other. This is more of
+ a character than a buffer op, so better that it's in character.c.
+ * fns.c, print.c: Adjust to above changes.
+
+ 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gnutls.c: Remove unused macros.
+ (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
+ (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
+ Remove macros that are defined and never used.
+ Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
+
+ 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
+
+ * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
+ (Fx_get_selection_internal): Minor cleanup.
+ (Fx_own_selection_internal): Rename arguments for consistency with
+ select.el.
+
+ 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
+
+ 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
+
+ * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
+
+ 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * dispnew.c (scrolling_window): Don't exclude the case that the
+ last enabled row in the desired matrix touches the bottom boundary.
+
+ 2011-05-21 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in ($(etc)/DOC): Make second command line even shorter.
+ (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
+ and add some more files.
+
2011-05-20 Eli Zaretskii <eliz@gnu.org>
* callproc.c (Fcall_process) [MSDOS]: Fix arguments to