diff options
author | Tom Tromey <tom@tromey.com> | 2019-11-17 15:50:31 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-01 12:29:50 -0700 |
commit | 517d261dfafb7e5317b841b01ab853a76deb8128 (patch) | |
tree | 5a020ab66a099aa1209b5b2bf26ba95e28773f36 /gdb/Makefile.in | |
parent | 484c9b643c206edf636d15aad1cf618e515350b7 (diff) | |
download | gdb-517d261dfafb7e5317b841b01ab853a76deb8128.zip gdb-517d261dfafb7e5317b841b01ab853a76deb8128.tar.gz gdb-517d261dfafb7e5317b841b01ab853a76deb8128.tar.bz2 |
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
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 58f5f93..e5c8faa 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -442,6 +442,7 @@ SUBDIR_UNITTESTS_SRCS = \ unittests/string_view-selftests.c \ unittests/style-selftests.c \ unittests/tracepoint-selftests.c \ + unittests/tui-selftests.c \ unittests/unpack-selftests.c \ unittests/utils-selftests.c \ unittests/vec-utils-selftests.c \ |