mdocml: fix use of less(1), add boundary check against a segfault.
This commit is contained in:
parent
0285878cc5
commit
0addb10c58
2 changed files with 15 additions and 2 deletions
13
srcpkgs/mdocml/patches/boundary-check.patch
Normal file
13
srcpkgs/mdocml/patches/boundary-check.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
Else mount(8) segfaults due to n->tok = roff_SP.
|
||||
|
||||
--- man_term.c 2017-07-30 12:00:19.858167629 -0400
|
||||
+++ man_term.c 2017-07-30 12:00:06.700039726 -0400
|
||||
@@ -674,7 +674,7 @@
|
||||
do {
|
||||
n = n->prev;
|
||||
} while (n != NULL && n->tok != TOKEN_NONE &&
|
||||
- termacts[n->tok].flags & MAN_NOTEXT);
|
||||
+ n->tok >= MAN_TH && termacts[n->tok].flags & MAN_NOTEXT);
|
||||
if (n == NULL || (n->tok == MAN_SS && n->body->child == NULL))
|
||||
break;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'mdocml'
|
||||
pkgname=mdocml
|
||||
version=1.14.2
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="mandoc-1.14.2"
|
||||
build_style=configure
|
||||
makedepends="zlib-devel"
|
||||
|
@ -25,7 +25,7 @@ alternatives="
|
|||
|
||||
post_extract() {
|
||||
# use less(1)
|
||||
sed -i 's,bin/more,bin/less,g' main.c *.1
|
||||
sed -i 's,"more -s","less -s",g' main.c
|
||||
sed -i 's,.Xr more,.Xr less,g' *.1
|
||||
}
|
||||
pre_configure() {
|
||||
|
|
Loading…
Reference in a new issue