From 6df9484bc416f20bd693d1b598c8d5b4e3f518b2 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Tue, 10 Jun 2025 12:15:06 +0000 Subject: [PATCH] Fix the increase MAX_NAME patch Resolves: RHEL-93724 --- 0001-lexgrog-Increase-MAX_NAME-to-16384.patch | 40 +++++++++++++++++++ man-db-2.9.3-Increase-MAX_NAME-to-16384.patch | 28 ------------- man-db.spec | 8 +++- 3 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 0001-lexgrog-Increase-MAX_NAME-to-16384.patch delete mode 100644 man-db-2.9.3-Increase-MAX_NAME-to-16384.patch diff --git a/0001-lexgrog-Increase-MAX_NAME-to-16384.patch b/0001-lexgrog-Increase-MAX_NAME-to-16384.patch new file mode 100644 index 0000000..3ade77c --- /dev/null +++ b/0001-lexgrog-Increase-MAX_NAME-to-16384.patch @@ -0,0 +1,40 @@ +From 034ed95667ca19934acd639b2e1decca6f0b9b5e Mon Sep 17 00:00:00 2001 +From: Lukas Javorsky +Date: Tue, 10 Jun 2025 12:12:38 +0000 +Subject: [PATCH] lexgrog Increase MAX_NAME to 16384 + +Inspired by: https://gitlab.com/man-db/man-db/-/commit/2da9562c194d520d38978f66bde7ef25d863d8a5 +--- + src/lexgrog.c | 2 +- + src/lexgrog.l | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lexgrog.c b/src/lexgrog.c +index f3d8ec9..b4e2419 100644 +--- a/src/lexgrog.c ++++ b/src/lexgrog.c +@@ -2663,7 +2663,7 @@ char *yytext; + #include "manconv_client.h" + + #define YY_READ_BUF_SIZE 1024 +-#define MAX_NAME 8192 ++#define MAX_NAME 16384 + + #define ARRAY_SIZE(array) (sizeof (array) / sizeof ((array)[0])) + +diff --git a/src/lexgrog.l b/src/lexgrog.l +index c4e3caf..bd10bc1 100644 +--- a/src/lexgrog.l ++++ b/src/lexgrog.l +@@ -65,7 +65,7 @@ + #include "manconv_client.h" + + #define YY_READ_BUF_SIZE 1024 +-#define MAX_NAME 8192 ++#define MAX_NAME 16384 + + #define ARRAY_SIZE(array) (sizeof (array) / sizeof ((array)[0])) + +-- +2.49.0 + diff --git a/man-db-2.9.3-Increase-MAX_NAME-to-16384.patch b/man-db-2.9.3-Increase-MAX_NAME-to-16384.patch deleted file mode 100644 index 4070b0d..0000000 --- a/man-db-2.9.3-Increase-MAX_NAME-to-16384.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a3bae4291bc31053df61c47129cd60fd764e4458 Mon Sep 17 00:00:00 2001 -From: Lukas Javorsky -Date: Tue, 27 May 2025 13:08:27 +0000 -Subject: [PATCH] Increase MAX_NAME to 16384 - -Since some manual pages with NAME sections exceeding 8192 bytes have -been observed in the wild (Debian bug #1102453), increase MAX_NAME to -16384. ---- - src/lexgrog.l | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lexgrog.l b/src/lexgrog.l -index c4e3caf..bd10bc1 100644 ---- a/src/lexgrog.l -+++ b/src/lexgrog.l -@@ -65,7 +65,7 @@ - #include "manconv_client.h" - - #define YY_READ_BUF_SIZE 1024 --#define MAX_NAME 8192 -+#define MAX_NAME 16384 - - #define ARRAY_SIZE(array) (sizeof (array) / sizeof ((array)[0])) - --- -2.49.0 - diff --git a/man-db.spec b/man-db.spec index 87aad02..a27f585 100644 --- a/man-db.spec +++ b/man-db.spec @@ -4,7 +4,7 @@ Summary: Tools for searching and reading man pages Name: man-db Version: 2.9.3 -Release: 8%{?dist} +Release: 9%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib License: GPLv2+ and GPLv3+ @@ -28,7 +28,7 @@ Patch2: man-db-2.9.1-snap.patch Patch3: man-db-2.9.3-coverity.patch # Inspired by upstream patch: https://gitlab.com/man-db/man-db/-/commit/2da9562c194d520d38978f66bde7ef25d863d8a5 -Patch4: man-db-2.9.3-Increase-MAX_NAME-to-16384.patch +Patch4: 0001-lexgrog-Increase-MAX_NAME-to-16384.patch Obsoletes: man < 2.0 Provides: man = %{version} @@ -238,6 +238,10 @@ fi %config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron %changelog +* Tue Jun 10 2025 Lukas Javorsky - 2.9.3-9 +- Fix patch to increase MAX_NAME to 16384 +- Resolves: RHEL-93724 + * Tue May 27 2025 Lukas Javorsky - 2.9.3-8 - Increase MAX_NAME to 16384 - Resolves: RHEL-93724