aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/p5-HTML-Tidy
diff options
context:
space:
mode:
authortobez <tobez@FreeBSD.org>2007-10-05 02:57:40 +0800
committertobez <tobez@FreeBSD.org>2007-10-05 02:57:40 +0800
commit2463e024cbd568e494df8a7283e591ee0cb48e3e (patch)
treed27a1cf483360e9c4de31ac307f831d27ca2844c /textproc/p5-HTML-Tidy
parent2e860d4fc1e6c22c611291c4297ecb529dcb4bc8 (diff)
downloadfreebsd-ports-gnome-2463e024cbd568e494df8a7283e591ee0cb48e3e.tar.gz
freebsd-ports-gnome-2463e024cbd568e494df8a7283e591ee0cb48e3e.tar.zst
freebsd-ports-gnome-2463e024cbd568e494df8a7283e591ee0cb48e3e.zip
Prevent the port from segfaulting under certain conditions.
PR: 116602 Approved by: maintainer (mat)
Diffstat (limited to 'textproc/p5-HTML-Tidy')
-rw-r--r--textproc/p5-HTML-Tidy/Makefile1
-rw-r--r--textproc/p5-HTML-Tidy/files/patch-Tidy.xs20
2 files changed, 21 insertions, 0 deletions
diff --git a/textproc/p5-HTML-Tidy/Makefile b/textproc/p5-HTML-Tidy/Makefile
index 152a1cd67672..0dfc96a4e752 100644
--- a/textproc/p5-HTML-Tidy/Makefile
+++ b/textproc/p5-HTML-Tidy/Makefile
@@ -7,6 +7,7 @@
PORTNAME= HTML-Tidy
PORTVERSION= 1.08
+PORTREVISION= 1
CATEGORIES= textproc www perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
diff --git a/textproc/p5-HTML-Tidy/files/patch-Tidy.xs b/textproc/p5-HTML-Tidy/files/patch-Tidy.xs
new file mode 100644
index 000000000000..f4b804c5f85d
--- /dev/null
+++ b/textproc/p5-HTML-Tidy/files/patch-Tidy.xs
@@ -0,0 +1,20 @@
+$Id$
+--- Tidy.xs.orig 2007-09-24 11:36:19.000000000 +0200
++++ Tidy.xs 2007-09-24 11:37:42.000000000 +0200
+@@ -55,6 +55,7 @@ _tidy_messages(input, configfile, tidy_o
+ const char* newline;
+ int rc = 0;
+ PPCODE:
++ tidyBufInit(&errbuf);
+ rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );
+
+ if ( (rc >= 0 ) && configfile && *configfile ) {
+@@ -117,6 +118,8 @@ _tidy_clean(input, configfile, tidy_opti
+ const char* newline;
+ int rc = 0;
+ PPCODE:
++ tidyBufInit(&output);
++ tidyBufInit(&errbuf);
+ /* Set our default first. */
+ /* Don't word-wrap */
+ rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );