Prevent the port from segfaulting under certain conditions.
PR: 116602 Approved by: maintainer (mat)
This commit is contained in:
parent
53568324f1
commit
aa934c0655
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=200839
2 changed files with 21 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= HTML-Tidy
|
||||
PORTVERSION= 1.08
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= textproc www perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
|
20
textproc/p5-HTML-Tidy/files/patch-Tidy.xs
Normal file
20
textproc/p5-HTML-Tidy/files/patch-Tidy.xs
Normal file
|
@ -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 );
|
Loading…
Reference in a new issue