]> git.eshelyaron.com Git - emacs.git/commit
ccl: add integer overflow checks
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 06:50:03 +0000 (23:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 May 2011 06:50:03 +0000 (23:50 -0700)
commit305696990bd24e602e83444651fbb1ed8819fe14
tree47ae4fc861057181e147caea99fa47df80eafe03
parentc11285dca1ee2896b487fe03408a4c7c356b6d5b
ccl: add integer overflow checks

* ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
(IN_INT_RANGE): New macros.
(ccl_driver): Use them to check for integer overflow when
decoding a CCL program.  Many of the new checks are whether XINT (x)
fits in int; it doesn't always, on 64-bit hosts.  The new version
doesn't catch all possible integer overflows, but it's an
improvement.
src/ChangeLog
src/ccl.c