This is the mail archive of the gdb-patches@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]

Re: [PATCH] TUI: avoid calling strcpy() on indentical string objects


On 04/26/2015 04:17 PM, Patrick Palka wrote:
> In tui_set_source_content(), when offset == 0 the source and destination
> pointers of the call to strcpy() are actually the same.  In this case
> not only is strcpy() unnecessary but it is also UB when the two strings
> overlap.

OK.

Boy is that code messy.

Thanks,
Pedro Alves


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