diff options
| author | Eli Zaretskii | 2019-03-07 17:16:43 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-03-07 17:16:43 +0200 |
| commit | 2848623420e0478ae5ffda8d79af9fde0128dfbe (patch) | |
| tree | 69391ad452e2c6df5f3c7c3cc9a3e39c458ac0cf | |
| parent | dbf1837940b090151b389235c1fc3617aef48234 (diff) | |
| download | emacs-2848623420e0478ae5ffda8d79af9fde0128dfbe.tar.gz emacs-2848623420e0478ae5ffda8d79af9fde0128dfbe.zip | |
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)
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index b63f82b7222..69eb29c5eb1 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1849,7 +1849,7 @@ commands to be prefixed by \"-interpreter-exec console\".") | |||
| 1849 | ;; Python and Guile commands that have an argument don't enter the | 1849 | ;; Python and Guile commands that have an argument don't enter the |
| 1850 | ;; recursive reading loop. | 1850 | ;; recursive reading loop. |
| 1851 | (let* ((control-command-p (string-match gdb-control-commands-regexp string)) | 1851 | (let* ((control-command-p (string-match gdb-control-commands-regexp string)) |
| 1852 | (command-arg (match-string 3 string)) | 1852 | (command-arg (and control-command-p (match-string 3 string))) |
| 1853 | (python-or-guile-p (string-match gdb-python-guile-commands-regexp | 1853 | (python-or-guile-p (string-match gdb-python-guile-commands-regexp |
| 1854 | string))) | 1854 | string))) |
| 1855 | (if (and control-command-p | 1855 | (if (and control-command-p |