]> git.eshelyaron.com Git - emacs.git/commit
sprintf-related integer and memory overflow issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 29 Aug 2011 15:43:34 +0000 (08:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 29 Aug 2011 15:43:34 +0000 (08:43 -0700)
commit62f19c197d32e8773a284616d575686d87903b7d
tree237de2d21e8a33f6821248890c01de7d83dbcba4
parent005d87bd2306e943a16b86c36d1482651d9932d8
sprintf-related integer and memory overflow issues.

* doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
(esprintf, esnprintf, exprintf, evxprintf): New functions.
* keyboard.c (command_loop_level): Now EMACS_INT, not int.
(cmd_error): kbd macro iterations count is now EMACS_INT, not int.
(modify_event_symbol): Do not assume that the length of
name_alist_or_stem is safe to alloca and fits in int.
(Fexecute_extended_command): Likewise for function name and binding.
(Frecursion_depth): Wrap around reliably on integer overflow.
* keymap.c (push_key_description): First arg is now EMACS_INT, not int,
since some callers pass EMACS_INT values.
(Fsingle_key_description): Don't crash if symbol name contains more
than MAX_ALLOCA bytes.
* minibuf.c (minibuf_level): Now EMACS_INT, not int.
(get_minibuffer): Arg is now EMACS_INT, not int.
* lisp.h (get_minibuffer, push_key_description): Reflect API changes.
(esprintf, esnprintf, exprintf, evxprintf): New decls.
* window.h (command_loop_level, minibuf_level): Reflect API changes.
src/ChangeLog
src/doprnt.c
src/keyboard.c
src/keymap.c
src/lisp.h
src/minibuf.c
src/window.h