diff --git a/bsc1209583.patch b/bsc1209583.patch new file mode 100644 index 0000000..0bf694b --- /dev/null +++ b/bsc1209583.patch @@ -0,0 +1,24 @@ +commit b5b8acfd30a8628061049757bb756e5714eedbcd +Author: Sergey Poznyakoff +Date: Wed Feb 23 23:10:27 2022 +0200 + + Bugfix + + * tools/parseopt.c (parseopt_next): Don't call parseopt_free. This + triggered coredumps if, e.g. parseopt_print_help() got called after + parsing the arguments. The bug was introduced by 203601fb06 in an + attempt to pacify valgrind an similar tools. + +diff --git a/tools/parseopt.c b/tools/parseopt.c +index 2d646ff..19a6576 100644 +--- a/tools/parseopt.c ++++ b/tools/parseopt.c +@@ -709,8 +709,5 @@ parseopt_next (void) + } + while (handle_option (rc)); + +- if (rc == EOF || rc == '?') +- parseopt_free (); +- + return rc; + } diff --git a/gdbm.changes b/gdbm.changes index b170a04..f5e0cde 100644 --- a/gdbm.changes +++ b/gdbm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 8 17:02:38 UTC 2023 - Danilo Spinella + +- Fix bsc#1209583, gdbm_load and gdbm_dump receive a SEGFAULT if + run without arguments + bsc1209583.patch + ------------------------------------------------------------------- Sun Feb 6 17:08:36 UTC 2022 - Andreas Stieger diff --git a/gdbm.spec b/gdbm.spec index 7cb4214..315f7dd 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,7 +1,7 @@ # # spec file for package gdbm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,9 @@ Source2: baselibs.conf Source4: %{name}.keyring # PATCH-FIX-SUSE: remove the build date from src/version.c Patch4: gdbm-no-build-date.patch +# PATCH-FIX-UPSTREAM danilo.spinella@suse.com bsc#1209583 +# gdbm_load and gdbm_dump receive a SEGFAULT if run without arguments +Patch5: bsc1209583.patch BuildRequires: libtool BuildRequires: makeinfo BuildRequires: readline-devel @@ -101,8 +104,7 @@ This package contains all necessary include files and libraries needed to develop applications that require these. %prep -%setup -q -%patch4 -p1 +%autosetup -p1 %build