PR gdb/13405:
authorTom Tromey <tromey@redhat.com>
Thu, 2 Feb 2012 16:22:21 +0000 (16:22 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 2 Feb 2012 16:22:21 +0000 (16:22 +0000)
* tui/tui-win.c (parse_scrolling_args): Don't write to possibly
read-only memory.

gdb/ChangeLog
gdb/tui/tui-win.c

index 4ca12dcf18cd7cd6128ab85dcc8f9d0a12941474..211af5979f9a72c3917763823d3e28c4baa697d6 100644 (file)
@@ -1,3 +1,9 @@
+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:
index a555145abbee37a59cc390aba49e77b93e80b602..b48bf3ef59ff62bc108b738bc39cb3b61bc1d246 100644 (file)
@@ -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
This page took 0.027879 seconds and 4 git commands to generate.