diff --git a/0006-Fix-possible-buffer-overrun.patch b/0006-Fix-possible-buffer-overrun.patch new file mode 100644 index 0000000000000000000000000000000000000000..04e24baf008dfae55c9286516e12c5443015aef9 --- /dev/null +++ b/0006-Fix-possible-buffer-overrun.patch @@ -0,0 +1,25 @@ +From ca3ab82e4e203f47f83a8bac79b6275bd8521f1d Mon Sep 17 00:00:00 2001 +From: "bas@zoetekouw.net" +Date: Wed, 9 Aug 2017 12:22:39 +0200 +Subject: [PATCH] Fix possible buffer overrun + +--- + src/manual.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/manual.c b/src/manual.c +index 431dd66..c5a1423 100644 +--- a/src/manual.c ++++ b/src/manual.c +@@ -201,7 +201,7 @@ construct_manualname(char *buf, int which) + char *base = xmalloc(1024); + char *ptr; + int tmppos; +- strcpy(base, manual[manuallinks[which].line - 1]); ++ strncpy(base, manual[manuallinks[which].line - 1],1023); + strip_manual(base); + ptr = base + strlen(base) - 3; + while (((isalpha(*ptr)) ||(*ptr == '.') ||(*ptr == '_')) &&(ptr > base)) +-- +2.33.0 + diff --git a/pinfo.spec b/pinfo.spec index 813fed3e9a2433524142eb41e58621eb90d59855..cbd2f207995262cb69629e8180a0a1cfbba759b1 100644 --- a/pinfo.spec +++ b/pinfo.spec @@ -1,6 +1,6 @@ Name: pinfo Version: 0.6.10 -Release: 29 +Release: 30 Summary: An user-friendly, console-based viewer for Info documents License: GPLv2 URL: http://pinfo.alioth.debian.org @@ -17,6 +17,7 @@ Patch0009: 0002-Fix-infinite-loop-when-regexp-matching-an-empty-stri.patch Patch0010: 0003-Fix-segfautl-by-closing-unopened-file.patch Patch0011: 0004-Fix-link-order-in-ncurses-autoconf-test.patch Patch0012: 0005-Fix-possible-out-of-buffer-write.patch +Patch0013: 0006-Fix-possible-buffer-overrun.patch BuildRequires: ncurses-devel automake gettext-devel libtool texinfo Requires: xdg-utils @@ -57,6 +58,9 @@ Pinfo-help provides man pages and other related help documents for pinfo. %{_mandir}/man1/pinfo.1* %changelog +* Thu Dec 28 2023 liyuanyuan - 0.6.10-30 +- Fix possible buffer overrun + * Tue Dec 12 2023 liyuanyuan - 0.6.10-29 - Fix possible out-of-buffer write