backport Fix possible buffer overrun
This commit is contained in:
parent
e89ec36534
commit
e376c25d59
25
0006-Fix-possible-buffer-overrun.patch
Normal file
25
0006-Fix-possible-buffer-overrun.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From ca3ab82e4e203f47f83a8bac79b6275bd8521f1d Mon Sep 17 00:00:00 2001
|
||||||
|
From: "bas@zoetekouw.net" <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
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: pinfo
|
Name: pinfo
|
||||||
Version: 0.6.10
|
Version: 0.6.10
|
||||||
Release: 27
|
Release: 28
|
||||||
Summary: An user-friendly, console-based viewer for Info documents
|
Summary: An user-friendly, console-based viewer for Info documents
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://pinfo.alioth.debian.org
|
URL: http://pinfo.alioth.debian.org
|
||||||
@ -16,6 +16,7 @@ Patch0008: 0002-Fix-infinite-loop-when-regexp-matching-an-empty-stri.patch
|
|||||||
Patch0009: 0003-Fix-segfautl-by-closing-unopened-file.patch
|
Patch0009: 0003-Fix-segfautl-by-closing-unopened-file.patch
|
||||||
Patch0010: 0004-Fix-link-order-in-ncurses-autoconf-test.patch
|
Patch0010: 0004-Fix-link-order-in-ncurses-autoconf-test.patch
|
||||||
Patch0011: 0005-Fix-possible-out-of-buffer-write.patch
|
Patch0011: 0005-Fix-possible-out-of-buffer-write.patch
|
||||||
|
Patch0012: 0006-Fix-possible-buffer-overrun.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel automake gettext-devel libtool texinfo
|
BuildRequires: ncurses-devel automake gettext-devel libtool texinfo
|
||||||
Requires: xdg-utils
|
Requires: xdg-utils
|
||||||
@ -57,6 +58,9 @@ Pinfo-help provides man pages and other related help documents for pinfo.
|
|||||||
%{_mandir}/man1/pinfo.1*
|
%{_mandir}/man1/pinfo.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 28 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-28
|
||||||
|
- Fix possible buffer overrun
|
||||||
|
|
||||||
* Tue Dec 12 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-27
|
* Tue Dec 12 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-27
|
||||||
- Fix possible out-of-buffer write
|
- Fix possible out-of-buffer write
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user