Fix crash when processing stray cats
(cherry picked from commit 17170bb64d73f9ad885e2922e4023023282a7bf0)
This commit is contained in:
parent
3f62a7f526
commit
cd6321db35
43
backport-mandb-Fix-crash-when-processing-stray-cats.patch
Normal file
43
backport-mandb-Fix-crash-when-processing-stray-cats.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From bc2573614d40ccf457991223d6727e29486621f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Watson <cjwatson@debian.org>
|
||||||
|
Date: Sun, 1 Jan 2023 17:51:27 +0000
|
||||||
|
Subject: [PATCH] mandb: Fix crash when processing stray cats
|
||||||
|
|
||||||
|
Regression introduced in man-db 2.11.0. Fixes Debian bug #1027487.
|
||||||
|
|
||||||
|
* src/straycats.c (check_for_stray): Pass a basic trace list to
|
||||||
|
`store_descriptions`, since that's required as of commit
|
||||||
|
d3e4b5522ae8152f10db0bb98e6873c9cc17ed59.
|
||||||
|
* NEWS.md: Document this.
|
||||||
|
---
|
||||||
|
src/straycats.c | 9 +++++++--
|
||||||
|
1 files changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/straycats.c b/src/straycats.c
|
||||||
|
index 95e8750a..932230b0 100644
|
||||||
|
--- a/src/straycats.c
|
||||||
|
+++ b/src/straycats.c
|
||||||
|
@@ -251,13 +251,18 @@ static int check_for_stray (MYDBM_FILE dbf)
|
||||||
|
if (find_name_decompressed (decomp,
|
||||||
|
catdir_base,
|
||||||
|
&lg)) {
|
||||||
|
- gl_list_t descs;
|
||||||
|
+ gl_list_t descs, trace;
|
||||||
|
strays++;
|
||||||
|
descs = parse_descriptions
|
||||||
|
(mandir_base, lg.whatis);
|
||||||
|
+ trace = new_string_list (GL_ARRAY_LIST,
|
||||||
|
+ true);
|
||||||
|
+ gl_list_add_last (trace,
|
||||||
|
+ xstrdup (catdir));
|
||||||
|
store_descriptions (dbf, descs, info,
|
||||||
|
NULL, mandir_base,
|
||||||
|
- NULL);
|
||||||
|
+ trace);
|
||||||
|
+ gl_list_free (trace);
|
||||||
|
gl_list_free (descs);
|
||||||
|
} else if (quiet < 2)
|
||||||
|
error (0, 0, _("warning: %s: whatis parse for %s(%s) failed"),
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: man-db
|
Name: man-db
|
||||||
Version: 2.11.0
|
Version: 2.11.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Online database for using man pages
|
Summary: Online database for using man pages
|
||||||
License: GPLv2+ and GPLv3+
|
License: GPLv2+ and GPLv3+
|
||||||
URL: http://www.nongnu.org/man-db/
|
URL: http://www.nongnu.org/man-db/
|
||||||
@ -11,6 +11,8 @@ Source1: man-db.crondaily
|
|||||||
Source2: man-db.sysconfig
|
Source2: man-db.sysconfig
|
||||||
Source3: man-db-cache-update.service
|
Source3: man-db-cache-update.service
|
||||||
|
|
||||||
|
Patch1: backport-mandb-Fix-crash-when-processing-stray-cats.patch
|
||||||
|
|
||||||
BuildRequires: gcc systemd gdbm-devel gettext groff less libpipeline-devel zlib-devel
|
BuildRequires: gcc systemd gdbm-devel gettext groff less libpipeline-devel zlib-devel
|
||||||
BuildRequires: po4a perl-interpreter perl-version make chrpath
|
BuildRequires: po4a perl-interpreter perl-version make chrpath
|
||||||
Requires: coreutils grep groff-base gzip less crontabs
|
Requires: coreutils grep groff-base gzip less crontabs
|
||||||
@ -26,7 +28,7 @@ man-db is an implementation of the standard Unix documentation system accessed u
|
|||||||
It uses a Berkeley DB database in place of the traditional flat-text whatis databases.
|
It uses a Berkeley DB database in place of the traditional flat-text whatis databases.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -167,6 +169,9 @@ fi
|
|||||||
%{_mandir}/ro/man8/mandb.8.gz
|
%{_mandir}/ro/man8/mandb.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 17 2023 yanglongkang <yanglongkang@h-partners.com> - 2.11.0-2
|
||||||
|
- Fix crash when processing stray cats
|
||||||
|
|
||||||
* Mon Nov 07 2022 renhongxun <renhongxun@h-partners.com> - 2.11.0-1
|
* Mon Nov 07 2022 renhongxun <renhongxun@h-partners.com> - 2.11.0-1
|
||||||
- upgrade version to 2.11.0
|
- upgrade version to 2.11.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user