This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13405] New: May write to read-only memory.


http://sourceware.org/bugzilla/show_bug.cgi?id=13405

             Bug #: 13405
           Summary: May write to read-only memory.
           Product: gdb
           Version: 7.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: xuzhongxing@foxmail.com
    Classification: Unclassified


In tui-win.c, parse_scrolling_args(),

   char *wname;
   int i;

   if (*buf_ptr == ' ')
     while (*(++buf_ptr) == ' ')
       ;

   if (*buf_ptr != (char) 0)
     wname = buf_ptr;
   else
     wname = "?";


   for (i = 0; i < strlen (wname); i++)
     wname[i] = toupper (wname[i]);

wname may points to string literal, which is read-only.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]