Compare commits
11 Commits
5386f9d858
...
b92b7ff40d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b92b7ff40d | ||
|
|
19ebf9a8fd | ||
|
|
e376c25d59 | ||
|
|
e89ec36534 | ||
|
|
df1da41a35 | ||
|
|
56dc69185a | ||
|
|
b248b1ce7e | ||
|
|
a09cb22d83 | ||
|
|
999bb09b51 | ||
|
|
658243be8b | ||
|
|
61ec0bb804 |
@ -0,0 +1,38 @@
|
||||
From 751fa603d386915cf1114c937892bd30e86ea687 Mon Sep 17 00:00:00 2001
|
||||
From: Bas Zoetekouw <bas@zoetekouw.net>
|
||||
Date: Sat, 27 Dec 2014 19:03:50 +0100
|
||||
Subject: [PATCH] Fix infinite loop when regexp-matching an empty string See
|
||||
Debian bug https://bugs.debian.org/358389
|
||||
|
||||
---
|
||||
src/video.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/src/video.c b/src/video.c
|
||||
index cfcd417..52a3615 100644
|
||||
--- a/src/video.c
|
||||
+++ b/src/video.c
|
||||
@@ -293,6 +293,20 @@ info_add_highlights(int pos, int cursor, long lines, int column, char **message)
|
||||
/* yes, found something, so highlight it */
|
||||
int n = pmatch[0].rm_eo - pmatch[0].rm_so;
|
||||
|
||||
+ if (n==0) { /* matched empty string! */
|
||||
+ /* display error message */
|
||||
+ char msg[81];
|
||||
+ snprintf(msg, 81, "%s",
|
||||
+ _("Warning: matched empty string") );
|
||||
+ attrset(bottomline);
|
||||
+ mvhline(maxy - 1, 0, ' ', maxx);
|
||||
+ mvaddstr(maxy - 1, 0, msg);
|
||||
+ move(0, 0);
|
||||
+ attrset(normal);
|
||||
+
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* point str at start of match */
|
||||
str += pmatch[0].rm_so;
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
25
0003-Fix-segfautl-by-closing-unopened-file.patch
Normal file
25
0003-Fix-segfautl-by-closing-unopened-file.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 97ed756e6220c8966d434cd225e8e904b62d0b92 Mon Sep 17 00:00:00 2001
|
||||
From: "bas@zoetekouw.net" <bas@zoetekouw.net>
|
||||
Date: Mon, 7 Aug 2017 23:02:16 +0200
|
||||
Subject: [PATCH] Fix segfautl by closing unopened file
|
||||
|
||||
---
|
||||
src/filehandling_functions.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/filehandling_functions.c b/src/filehandling_functions.c
|
||||
index 7df08fd..dd0866c 100644
|
||||
--- a/src/filehandling_functions.c
|
||||
+++ b/src/filehandling_functions.c
|
||||
@@ -211,7 +211,7 @@ dirpage_lookup(char **type, char ***message, long *lines,
|
||||
}
|
||||
|
||||
/* if we haven't found anything, clean up and exit */
|
||||
- if (!goodHit)
|
||||
+ if (id && !goodHit)
|
||||
{
|
||||
fclose(id);
|
||||
id = 0;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
41
0004-Fix-link-order-in-ncurses-autoconf-test.patch
Normal file
41
0004-Fix-link-order-in-ncurses-autoconf-test.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From d2633be28487f7b9adf1cce612ca781b236f2700 Mon Sep 17 00:00:00 2001
|
||||
From: "bas@zoetekouw.net" <bas@zoetekouw.net>
|
||||
Date: Tue, 8 Aug 2017 19:25:34 +0200
|
||||
Subject: [PATCH] Fix link order in ncurses autoconf test Thanks to Steve
|
||||
McIntyre for the patch (https://bugs.debian.org/646486)
|
||||
|
||||
---
|
||||
macros/curses.m4 | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/macros/curses.m4 b/macros/curses.m4
|
||||
index b42fe7c..415eecf 100644
|
||||
--- a/macros/curses.m4
|
||||
+++ b/macros/curses.m4
|
||||
@@ -254,11 +254,11 @@ dnl check if the curses header we found, works
|
||||
dnl
|
||||
AC_DEFUN([AC_CHECK_CURSES_COMPILE], [
|
||||
|
||||
- dnl save CFLAGS and LDFLAGS and set new ones
|
||||
+ dnl save CFLAGS and LIBS and set new ones
|
||||
CFLAGS_OLD=$CFLAGS
|
||||
CFLAGS="$CFLAGS $curses_includes"
|
||||
- LDFLAGS_OLD=$LDFLAGS
|
||||
- LDFLAGS="$LDFLAGS $curses_libs"
|
||||
+ LIBS_OLD=$LIBS
|
||||
+ LIBS="$LIBS $curses_libs"
|
||||
|
||||
dnl do the compile test
|
||||
AC_MSG_CHECKING([if curses is usable])
|
||||
@@ -288,7 +288,7 @@ AC_DEFUN([AC_CHECK_CURSES_COMPILE], [
|
||||
|
||||
dnl restore variables
|
||||
CFLAGS=$CFLAGS_OLD
|
||||
- LDFLAGS=$LDFLAGS_OLD
|
||||
+ LIBS=$LIBS_OLD
|
||||
|
||||
])
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
28
0005-Fix-possible-out-of-buffer-write.patch
Normal file
28
0005-Fix-possible-out-of-buffer-write.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From df3b9600a16061a7661a58ba2750228b07825486 Mon Sep 17 00:00:00 2001
|
||||
From: "bas@zoetekouw.net" <bas@zoetekouw.net>
|
||||
Date: Wed, 9 Aug 2017 12:22:24 +0200
|
||||
Subject: [PATCH] Fix possible out-of-buffer write
|
||||
|
||||
---
|
||||
src/manual.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/manual.c b/src/manual.c
|
||||
index 09b77f7..431dd66 100644
|
||||
--- a/src/manual.c
|
||||
+++ b/src/manual.c
|
||||
@@ -211,9 +211,8 @@ construct_manualname(char *buf, int which)
|
||||
ptr++;
|
||||
strcpy(buf, ptr);
|
||||
tmppos = strlen(buf);
|
||||
- /* TODO: check the following statement */
|
||||
- if (tmppos > 1);
|
||||
- buf[tmppos - 2] = 0;
|
||||
+ if (tmppos > 1)
|
||||
+ buf[tmppos - 2] = 0;
|
||||
strcat(buf, manuallinks[which].name);
|
||||
xfree(base);
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
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
|
||||
|
||||
22
pinfo.spec
22
pinfo.spec
@ -1,6 +1,6 @@
|
||||
Name: pinfo
|
||||
Version: 0.6.10
|
||||
Release: 23
|
||||
Release: 28
|
||||
Summary: An user-friendly, console-based viewer for Info documents
|
||||
License: GPLv2
|
||||
URL: http://pinfo.alioth.debian.org
|
||||
@ -12,6 +12,11 @@ Patch0004: pinfo-0.6.9-mansection.patch
|
||||
Patch0005: pinfo-0.6.9-infopath.patch
|
||||
Patch0006: pinfo-0.6.10-man.patch
|
||||
Patch0007: 0001-Gracefully-handle-missing-indirect-info-nodes.patch
|
||||
Patch0008: 0002-Fix-infinite-loop-when-regexp-matching-an-empty-stri.patch
|
||||
Patch0009: 0003-Fix-segfautl-by-closing-unopened-file.patch
|
||||
Patch0010: 0004-Fix-link-order-in-ncurses-autoconf-test.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
|
||||
Requires: xdg-utils
|
||||
@ -53,6 +58,21 @@ Pinfo-help provides man pages and other related help documents for pinfo.
|
||||
%{_mandir}/man1/pinfo.1*
|
||||
|
||||
%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
|
||||
- Fix possible out-of-buffer write
|
||||
|
||||
* Fri Nov 24 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-26
|
||||
- Fix link order in ncurses autoconf test
|
||||
|
||||
* Thu Nov 09 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-25
|
||||
- Fix segfautl by closing unopened file
|
||||
|
||||
* Fri Nov 03 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-24
|
||||
- Fix infinite loop when regexp-matching an empty string
|
||||
|
||||
* Thu Oct 26 2023 liyuanyuan <liyuanyuan@xfusion.com> - 0.6.10-23
|
||||
- Gracefully handle missing indirect info nodes
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user