summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/thunk.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-08-03 12:45:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-08-03 13:00:27 -0700
commit13fe8a27042b1539d43727e6df97c386c61c3053 (patch)
treee176e0687bfd1c7a427b03c170a1463e0a4b515a /lisp/emacs-lisp/thunk.el
parentb60b6ffb35f4ffbeecb73381e58712ff5cdd7e40 (diff)
downloademacs-13fe8a27042b1539d43727e6df97c386c61c3053.tar.gz
emacs-13fe8a27042b1539d43727e6df97c386c61c3053.tar.bz2
emacs-13fe8a27042b1539d43727e6df97c386c61c3053.zip
Fix rare undefined behaviors in replace-match
* src/search.c (Freplace_match): Simplify by caching search_regs components. Fix sanity check for out-of-range subscripts; it incorrectly allowed negative subscripts, subscripts equal to search_regs.num_regs, and it had undefined behavior for subscripts outside ptrdiff_t range. Improve wording of newly-introduced replace-match diagnostic. Rework use of opoint, to avoid setting point to an out-of-range value in rare cases involving modification hooks.
Diffstat (limited to 'lisp/emacs-lisp/thunk.el')
0 files changed, 0 insertions, 0 deletions