]> git.eshelyaron.com Git - emacs.git/commit
Reject outlandishly-wide bignums
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2018 03:44:19 +0000 (20:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2018 03:45:08 +0000 (20:45 -0700)
commit3b9017b5ba6b7041fbf70691092533286cc9b98d
tree0bb46f0a20ea28ef2abfee1b7ab749867f2809ff
parentbb7e0338919d1c7068a64b3855e50fac345e4e05
Reject outlandishly-wide bignums

Do not allow bignums that are so wide that their log base 2
might not fit into a fixnum, as this will cause problems elsewhere.
We already have a similar limitation for bool-vectors.
* src/emacs.c (check_bignum_size, xmalloc_for_gmp): New function.
(xrealloc_for_gmp): Check for too-large bignum.
(main): Use xmalloc_for_gmp.
src/emacs.c