Accepting request 1102983 from home:dspinella:branches:devel:libraries:c_c++

- Fix bsc#1209583, gdbm_load and gdbm_dump receive a SEGFAULT if
  run without arguments
  bsc1209583.patch

OBS-URL: https://build.opensuse.org/request/show/1102983
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gdbm?expand=0&rev=70
This commit is contained in:
Adam Majer 2023-08-12 10:15:29 +00:00 committed by Git OBS Bridge
parent 8040599cfb
commit cd66db0ac2
3 changed files with 36 additions and 3 deletions

24
bsc1209583.patch Normal file
View File

@ -0,0 +1,24 @@
commit b5b8acfd30a8628061049757bb756e5714eedbcd
Author: Sergey Poznyakoff <gray@gnu.org>
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;
}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 8 17:02:38 UTC 2023 - Danilo Spinella <danilo.spinella@suse.com>
- 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 <andreas.stieger@gmx.de>

View File

@ -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