mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-24 19:03:29 +00:00
Avoid invalid regexp in wide docstring check
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Avoid constructing an invalid regexp during byte-compilation by limiting the number of columns to the current RE_DUP_MAX of 65535. This protects against pathological values of fill-column, for example (bug#49426).
This commit is contained in:
parent
4db28a9dc8
commit
044742bfe8
@ -1627,7 +1627,7 @@ the `\\\\=[command]' ones that are assumed to be of length
|
||||
`byte-compile--wide-docstring-substitution-len'. Also ignore
|
||||
URLs."
|
||||
(string-match
|
||||
(format "^.\\{%s,\\}$" (int-to-string (1+ col)))
|
||||
(format "^.\\{%d,\\}$" (min (1+ col) #xffff)) ; Heed RE_DUP_MAX.
|
||||
(replace-regexp-in-string
|
||||
(rx (or
|
||||
;; Ignore some URLs.
|
||||
|
Loading…
Reference in New Issue
Block a user