From 80675566c894375aa97b872cc5ca8b7977c6e7ec Mon Sep 17 00:00:00 2001 From: wangzhiqiang Date: Tue, 28 Jun 2022 10:01:18 +0800 Subject: [PATCH] Fix coredump in gdbmtool history command Signed-off-by: wangzhiqiang (cherry picked from commit fe3e76def5d2f18027a36ff9bd880118f496f607) --- ...coredump-in-gdbmtool-history-command.patch | 30 +++++++++++++++++++ gdbm.spec | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Fix-coredump-in-gdbmtool-history-command.patch diff --git a/Fix-coredump-in-gdbmtool-history-command.patch b/Fix-coredump-in-gdbmtool-history-command.patch new file mode 100644 index 0000000..3a36060 --- /dev/null +++ b/Fix-coredump-in-gdbmtool-history-command.patch @@ -0,0 +1,30 @@ +From d3f504875cb94d2e458e1e233e5ab8b40281fe2b Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Mon, 27 Jun 2022 11:49:31 +0300 +Subject: [PATCH] Fix bug#569 + +* src/gdbmshell.c (input_history_begin): return GDBMSHELL_ERR +if history is not available. + +Conflict: tools/gdbmshell.c --> src/gdbmshell.c +Reference: https://puszcza.gnu.org.ua/bugs/index.php?569 +--- + src/gdbmshell.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gdbmshell.c b/src/gdbmshell.c +index 4b84c23..12fc2bd 100644 +--- a/src/gdbmshell.c ++++ b/src/gdbmshell.c +@@ -1714,7 +1714,7 @@ input_history_begin (struct command_param *param, + /* TRANSLATORS: %s is the stream name */ + terror (_("input history is not available for %s input stream"), + input_stream_name ()); +- return GDBMSHELL_OK; ++ return GDBMSHELL_ERR; + } + + switch (param->argc) +-- +1.8.3.1 + diff --git a/gdbm.spec b/gdbm.spec index b0d670c..7167481 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,6 +1,6 @@ Name: gdbm Version: 1.22 -Release: 6 +Release: 7 Epoch: 1 Summary: A library of database functions that work similar to the standard UNIX dbm License: GPLv3+ @@ -11,6 +11,7 @@ Patch0: Fix-gdbmtool-import-command.patch Patch1: Fix-binary-dump-format-for-key-and-or-data-of-zero-s.patch Patch2: gdbm_dump-fix-command-line-error-detection.patch Patch3: Fix-location-tracking-in-gdbmtool.-Fix-the-recover-c.patch +Patch4: Fix-coredump-in-gdbmtool-history-command.patch BuildRequires: gcc libtool gettext readline-devel bison flex @@ -102,6 +103,9 @@ fi %{_infodir}/*.info* %changelog +* Tue Jun 28 2022 wangzhqiang - 1:1.22-7 +- DESC: Fix coredump in gdbmtool history command + * Thu Jun 23 2022 wangzhqiang - 1:1.22-6 - DESC: fix location tracking in gdbmtool, fix the recover command -- Gitee