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/19495] New: src/gdb/gdbserver/remote-utils.c:1581: pointless call to strcpy ?


https://sourceware.org/bugzilla/show_bug.cgi?id=19495

            Bug ID: 19495
           Summary: src/gdb/gdbserver/remote-utils.c:1581: pointless call
                    to strcpy ?
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

[src/gdb/gdbserver/remote-utils.c:1581] ->
[src/gdb/gdbserver/remote-utils.c:1582]: (performance) Buffer 'own_buf' is
being written before its old content has been used.

Source code is

  strcpy (own_buf, "qRelocInsn:");
  sprintf (own_buf, "qRelocInsn:%s;%s", paddress (oldloc),
       paddress (*to));

-- 
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]