aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-02 16:22:21 +0000
committerTom Tromey <tromey@redhat.com>2012-02-02 16:22:21 +0000
commitc709a7c2b06cc388ab364015c433b95076d1eb56 (patch)
tree1f42a70757837e5ac3a72d195c69243e145eba55 /gdb
parent7c4f9963c7b33e51e4bf1cf8c9de6f870a1d3307 (diff)
downloadgdb-c709a7c2b06cc388ab364015c433b95076d1eb56.zip
gdb-c709a7c2b06cc388ab364015c433b95076d1eb56.tar.gz
gdb-c709a7c2b06cc388ab364015c433b95076d1eb56.tar.bz2
PR gdb/13405:
* tui/tui-win.c (parse_scrolling_args): Don't write to possibly read-only memory.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/tui/tui-win.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4ca12dc..211af59 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2012-02-02 Tom Tromey <tromey@redhat.com>
+ PR gdb/13405:
+ * tui/tui-win.c (parse_scrolling_args): Don't write to possibly
+ read-only memory.
+
+2012-02-02 Tom Tromey <tromey@redhat.com>
+
PR gdb/9307:
* symtab.c (lookup_language_this): Set block_found.
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index a555145..b48bf3e 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1583,13 +1583,16 @@ parse_scrolling_args (char *arg,
;
if (*buf_ptr != (char) 0)
- wname = buf_ptr;
+ {
+ wname = buf_ptr;
+
+ /* Validate the window name. */
+ for (i = 0; i < strlen (wname); i++)
+ wname[i] = toupper (wname[i]);
+ }
else
wname = "?";
- /* Validate the window name. */
- for (i = 0; i < strlen (wname); i++)
- wname[i] = toupper (wname[i]);
*win_to_scroll = tui_partial_win_by_name (wname);
if (*win_to_scroll == (struct tui_win_info *) NULL