Commit 28486234 authored by Eli Zaretskii's avatar Eli Zaretskii

Avoid undefined behavior in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-send): Don't call match-string
if this is not a control command.  (Bug#34769)
parent dbf18379
Pipeline #938 passed with stage
in 25 minutes and 36 seconds
......@@ -1849,7 +1849,7 @@ commands to be prefixed by \"-interpreter-exec console\".")
;; Python and Guile commands that have an argument don't enter the
;; recursive reading loop.
(let* ((control-command-p (string-match gdb-control-commands-regexp string))
(command-arg (match-string 3 string))
(command-arg (and control-command-p (match-string 3 string)))
(python-or-guile-p (string-match gdb-python-guile-commands-regexp
(if (and control-command-p
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment