docbook-xsl: restore patch to prevent stack overflows when generating huge manpages
This commit is contained in:
parent
768fadeabb
commit
7f838e78a6
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3xATi6j1sah0A0ceVVzjzVGl1dbrCNbNXWCw/xmayCOg/gdHYVwYdnh/1r5Ic7xtyJra6oER2fEcDrIop1bP3gg=
|
||||
SHA256 (Pkgfile) = 9d3b3d94f095203d26a5b066eee9c23f1e67a1bbb547db91c573178d30a920b1
|
||||
RWSagIOpLGJF3xPUD2XvvykIy86PazzgoUmvB1/6NxCK4V4ndSHLjnx/kiRpjnKVj+PaEbqyXIAxIybMjua9MwYxMIy4eODnygA=
|
||||
SHA256 (Pkgfile) = 54fa73710eba9e9260b0267e956e944d2f7bf9d6cf27ff74a3c7405d4ac592a5
|
||||
SHA256 (.footprint) = 4b6ed45e648412c75a129eafd09546c50576f7c56ed35cfac9b37a54b80f942f
|
||||
SHA256 (docbook-xsl-nons-1.79.2.tar.bz2) = ee8b9eca0b7a8f89075832a2da7534bce8c5478fc8fc2676f512d5d87d832102
|
||||
SHA256 (non-recursive-string-subst.patch) = 193ec26dcb37bdf12037ed4ea98d68bd550500c8e96b719685d76d7096c3f9b3
|
||||
|
@ -5,12 +5,13 @@
|
||||
|
||||
name=docbook-xsl
|
||||
version=1.79.2
|
||||
release=3
|
||||
source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/$version/$name-nons-$version.tar.bz2)
|
||||
release=4
|
||||
source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/$version/$name-nons-$version.tar.bz2 non-recursive-string-subst.patch)
|
||||
|
||||
build() {
|
||||
cd $name-nons-$version
|
||||
|
||||
patch -Np2 -i $SRC/non-recursive-string-subst.patch
|
||||
install -v -m 0755 -d $PKG/usr/share/xml/docbook/xsl-stylesheets-$version
|
||||
|
||||
cp -v -R \
|
||||
|
32
docbook-xsl/non-recursive-string-subst.patch
Normal file
32
docbook-xsl/non-recursive-string-subst.patch
Normal file
@ -0,0 +1,32 @@
|
||||
Description: use EXSLT "replace" function when available
|
||||
A recursive implementation of string.subst is problematic,
|
||||
long strings with many matches will cause stack overflows.
|
||||
Author: Peter De Wachter <pdewacht@gmail.com>
|
||||
Bug-Debian: https://bugs.debian.org/750593
|
||||
|
||||
--- docbook-xsl-1.78.1+dfsg.orig/docbook-xsl/lib/lib.xsl
|
||||
+++ docbook-xsl-1.78.1+dfsg/docbook-xsl/lib/lib.xsl
|
||||
@@ -6,7 +6,11 @@
|
||||
|
||||
This module implements DTD-independent functions
|
||||
|
||||
- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
+ ******************************************************************** -->
|
||||
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
+ xmlns:str="http://exslt.org/strings"
|
||||
+ exclude-result-prefixes="str"
|
||||
+ version="1.0">
|
||||
|
||||
<xsl:template name="dot.count">
|
||||
<!-- Returns the number of "." characters in a string -->
|
||||
@@ -52,6 +56,9 @@
|
||||
<xsl:param name="replacement"/>
|
||||
|
||||
<xsl:choose>
|
||||
+ <xsl:when test="function-available('str:replace')">
|
||||
+ <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
|
||||
+ </xsl:when>
|
||||
<xsl:when test="contains($string, $target)">
|
||||
<xsl:variable name="rest">
|
||||
<xsl:call-template name="string.subst">
|
||||
|
Loading…
x
Reference in New Issue
Block a user