]> git.eshelyaron.com Git - emacs.git/commit
Avoid unbounded growth of cl-random-state components (bug#38753)
authorMattias Engdegård <mattiase@acm.org>
Sun, 29 Dec 2019 12:51:48 +0000 (13:51 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sun, 29 Dec 2019 12:55:25 +0000 (13:55 +0100)
commitaa0c679f484347d20ab6f7c0f75f32f5e360cb89
tree1471501c2d1effaa28cf933cf52681d635a41fc5
parentd6922db49dea33ac2bca8b33d24763cc7b2e4cd7
Avoid unbounded growth of cl-random-state components (bug#38753)

* lisp/emacs-lisp/cl-extra.el (cl-random):
Perform the modulo 2**23 operation before updating the state instead
of after.  The result is always the same, but it prevents the state
from growing into arbitrary large bignums.

Patch from Christopher Wellons.
lisp/emacs-lisp/cl-extra.el