Fix latent bug in tui_copy_source_line
authorTom Tromey <tom@tromey.com>
Sun, 17 Nov 2019 22:50:31 +0000 (15:50 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 1 Dec 2019 19:29:50 +0000 (12:29 -0700)
commit517d261dfafb7e5317b841b01ab853a76deb8128
tree5a020ab66a099aa1209b5b2bf26ba95e28773f36
parent484c9b643c206edf636d15aad1cf618e515350b7
Fix latent bug in tui_copy_source_line

tui_copy_source_line has a bug, where it can advance past the
terminating \0 in its input string.  This patch fixes the bug and adds
a test case for this function.

gdb/ChangeLog
2019-12-01  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.c (tui_copy_source_line): Don't advance past
\0.
* unittests/tui-selftests.c: New file.
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add tui-selftests.c.

Change-Id: I46cdabe6e57549983149b8f640cda5edd16fa260
gdb/ChangeLog
gdb/Makefile.in
gdb/tui/tui-winsource.c
gdb/unittests/tui-selftests.c [new file with mode: 0644]
This page took 0.025787 seconds and 4 git commands to generate.