@@ -0,0 +1,24 @@
|
|
1
|
+
Upstream backport: 00ba17479ff31c6825f0e6f28b965f11525e83f6
|
2
|
+
Fix problem with loading old format of databases exports
|
3
|
+
|
4
|
+
diff -ur gdbm-1.18/src/gdbmopen.c gdbm-patch/src/gdbmopen.c
|
5
|
+
--- gdbm-1.18/src/gdbmopen.c 2018-08-03 10:46:39.000000000 +0200
|
6
|
+
+++ gdbm-patch/src/gdbmopen.c 2022-07-01 08:56:08.000000000 +0200
|
7
|
+
|
8
|
+
return GDBM_BLOCK_SIZE_ERROR;
|
9
|
+
}
|
10
|
+
|
11
|
+
- if (hdr->next_block != st->st_size)
|
12
|
+
- /* FIXME: Should return GDBM_NEED_RECOVERY instead? */
|
13
|
+
- return GDBM_BAD_HEADER;
|
14
|
+
+ /* Technically speaking, the condition below should read
|
15
|
+
+ hdr->next_block != st->st_size
|
16
|
+
+ However, gdbm versions prior to commit 4e819c98 could leave
|
17
|
+
+ hdr->next_block pointing beyond current end of file. To ensure
|
18
|
+
+ backward compatibility with these versions, the condition has been
|
19
|
+
+ slackened to this: */
|
20
|
+
+ if (hdr->next_block < st->st_size)
|
21
|
+
+ return GDBM_BAD_HEADER;
|
22
|
+
|
23
|
+
/* Make sure dir and dir + dir_size fall within the file boundary */
|
24
|
+
if (!(hdr->dir > 0
|
@@ -3,21 +3,16 @@
|
|
3
3
|
Summary: A GNU set of database routines which use extensible hashing
|
4
4
|
Name: gdbm
|
5
5
|
Version: 1.18
|
6
|
-
Release:
|
6
|
+
Release: 2%{?dist}
|
7
7
|
Epoch: 1
|
8
8
|
License: GPLv3+
|
9
9
|
URL: http://www.gnu.org/software/gdbm/
|
10
10
|
|
11
11
|
Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
|
12
|
-
# See https://bugzilla.redhat.com/show_bug.cgi?id=4457
|
13
|
-
# Upstream bug http://puszcza.gnu.org.ua/bugs/?func=detailitem&item_id=151
|
14
|
-
# Fixed in http://cvs.gnu.org.ua/viewvc/gdbm/gdbm/src/gdbmopen.c?r1=1.12&r2=1.13
|
15
|
-
# - version 1.10
|
16
|
-
#Patch0: gdbm-1.10-zeroheaders.patch
|
17
|
-
# NOTE-WARNING file doesn't contain distro dependent largefile note now
|
18
|
-
#Patch1: gdbm-1.10-fedora.patch
|
19
12
|
|
20
|
-
|
13
|
+
Patch1: gdbm-1.17-coverity-fixes.patch
|
14
|
+
# Backport of upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6
|
15
|
+
Patch2: gdbm-1.18-backward-compatibility.patch
|
21
16
|
|
22
17
|
BuildRequires: gcc
|
23
18
|
BuildRequires: libtool
|
@@ -58,6 +53,7 @@ gdbm database library. You'll also need to install the gdbm package.
|
|
58
53
|
|
59
54
|
%prep
|
60
55
|
%setup -q
|
56
|
+
%patch1 -p1
|
61
57
|
%patch2 -p1
|
62
58
|
|
63
59
|
%build
|
@@ -125,6 +121,11 @@ fi
|
|
125
121
|
%{_mandir}/man3/*
|
126
122
|
|
127
123
|
%changelog
|
124
|
+
* Fri Jul 01 2022 <fjanus@redhat.com> - 1.18-2
|
125
|
+
- Add backward compatibility patch
|
126
|
+
- Resolves: #2097704
|
127
|
+
- Backport from upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6
|
128
|
+
|
128
129
|
* Mon Sep 03 2018 mskalick@redhat.com - 1:1.18-1
|
129
130
|
- Rebase to latest release 1.18
|
130
131
|
- Fix issues found by coverity
|