mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Fix regex stack overflow in gdb-mi.el when parsing complex locals
* lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer): Skip string literals with (forward-sexp) instead of matching with regex. (Bug#29868) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
fb20043b2f
commit
30ffc256ab
1 changed files with 3 additions and 3 deletions
|
|
@ -2717,10 +2717,10 @@ If `default-directory' is remote, full file names are adapted accordingly."
|
|||
(insert "]"))))))
|
||||
(goto-char (point-min))
|
||||
(insert "{")
|
||||
(let ((re (concat "\\([[:alnum:]-_]+\\)=\\({\\|\\[\\|\"\"\\|"
|
||||
gdb--string-regexp "\\)")))
|
||||
(let ((re (concat "\\([[:alnum:]-_]+\\)=")))
|
||||
(while (re-search-forward re nil t)
|
||||
(replace-match "\"\\1\":\\2" nil nil)))
|
||||
(replace-match "\"\\1\":" nil nil)
|
||||
(if (eq (char-after) ?\") (forward-sexp) (forward-char))))
|
||||
(goto-char (point-max))
|
||||
(insert "}")))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue