diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2021-07-06 01:05:41 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2021-07-06 18:56:15 +0100 |
commit | 044742bfe8c7c22e303242c40e16fbe9e564727a (patch) | |
tree | 56abffc45e148d715d203f8eb0176ba5b5c34095 /lisp/emacs-lisp/bytecomp.el | |
parent | 4db28a9dc83be033d309782e5b14c9ebc9f01f38 (diff) | |
download | emacs-044742bfe8c7c22e303242c40e16fbe9e564727a.tar.gz emacs-044742bfe8c7c22e303242c40e16fbe9e564727a.tar.bz2 emacs-044742bfe8c7c22e303242c40e16fbe9e564727a.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 70999648d47..6970c8a5055 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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. |