* character.c (lisp_string_width): Check for string overflow.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 May 2011 05:08:59 +0000 (22:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 May 2011 05:08:59 +0000 (22:08 -0700)
commit2b4560a850d2ea0767d0a3c4db19e4468f61b4eb
treeca99d199897a9289dfff5a1f492341402d79ae69
parentcb93f9bef01e95b17b3d7b8786c103505355d98c
* character.c (lisp_string_width): Check for string overflow.

Use EMACS_INT, not int, for string indexes and lengths; in
particular, 2nd arg is now EMACS_INT, not int.  Do not crash if
the resulting string length overflows an EMACS_INT; instead,
report a string overflow if no precision given.  When checking for
precision exhaustion, use a check that cannot possibly have
integer overflow.  (Bug#8675)
* character.h (lisp_string_width): Adjust to new signature.
src/ChangeLog
src/character.c
src/character.h