ports/contrib (3.7): docbook-xsl: restore patch to prevent stack overflows when generating huge manpages
commit 7f838e78a644806f5a4c1d48a94de880d4487e98 Author: John McQuah <jmcquah@disroot.org> Date: Fri Jan 27 17:48:01 2023 -0500 docbook-xsl: restore patch to prevent stack overflows when generating huge manpages diff --git a/docbook-xsl/.signature b/docbook-xsl/.signature index 836db98ca..7eae680c1 100644 --- a/docbook-xsl/.signature +++ b/docbook-xsl/.signature @@ -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 diff --git a/docbook-xsl/Pkgfile b/docbook-xsl/Pkgfile index ec3685cea..9ca2b7937 100644 --- a/docbook-xsl/Pkgfile +++ b/docbook-xsl/Pkgfile @@ -5,12 +5,13 @@ name=docbook-xsl version=1.79.2 -release=3 -source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/$ver...) +release=4 +source=(https://github.com/docbook/xslt10-stylesheets/releases/download/release/$ver... 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 \ diff --git a/docbook-xsl/non-recursive-string-subst.patch b/docbook-xsl/non-recursive-string-subst.patch new file mode 100644 index 000000000..ae845ad00 --- /dev/null +++ b/docbook-xsl/non-recursive-string-subst.patch @@ -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"> +
participants (1)
-
crux@crux.nu