* doc.c: Integer and memory overflow fixes.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 21:34:39 +0000 (14:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 28 Jul 2011 21:34:39 +0000 (14:34 -0700)
commit3d0c92a26bb73fdc542e4d9e467b31fd0ad02417
tree30754be8833646ed36d98fe37695b5a8630806b5
parentca9ce8f2cb9d3d70c4e7d9dc9299ea4d5d71dfbc
* doc.c: Integer and memory overflow fixes.

(get_doc_string_buffer_size): Now ptrdiff_t, not int.
(get_doc_string): Check for size calculation overflow.
Don't update size until allocation succeeds.
(get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
EMACS_INT, where ptrdiff_t will do.
(Fsubstitute_command_keys): Check for string overflow.
src/ChangeLog
src/doc.c