Date: | Tue, 19 Oct 2004 15:49:11 +0200 |
From: | Dominique Quatravaux <dom [...] idealx.com> |
To: | bug-html-tidy [...] rt.cpan.org, Andy Lester <andy [...] petdance.com> |
Subject: | [HTML::Tidy] t/segfault.t corrected |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Attached is a patch to HTML::Tidy's Tidy.xs that fixes the
t/segfault-form.t. Please apply against version 1.04.
Although I do not (yet) fully understand the intended semantics of
- ->clean(), I noticed that there was a code path where RETVAL would get
no value before reaching the end of the function and I made it return
undef in this case.
Regards,
- --
Dominique QUATRAVAUX Ingénieur senior
01 44 42 00 08 IDEALX
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBdRtXMJAKAU3mjcsRAs4kAKC+pBX9pgFnCoNmBWSiQEH3WUtFvwCgnt50
uTpuR6mv6/2vfTyfI/Jwb7s=
=iPrQ
-----END PGP SIGNATURE-----
diff -r -U3 HTML-Tidy-1.04/Tidy.xs HTML-Tidy-1.04.NEW/Tidy.xs
--- HTML-Tidy-1.04/Tidy.xs Fri Apr 2 07:36:19 2004
+++ HTML-Tidy-1.04.NEW/Tidy.xs Tue Oct 19 15:33:09 2004
@@ -61,8 +61,11 @@
if ( rc >= 0 ) {
char *str;
str = (char *)output.bp;
- if ( str )
+ if ( str ) {
RETVAL = newSVpvn( str, strlen(str) );
+ } else {
+ RETVAL = &PL_sv_undef;
+ }
tidyBufFree( &output );
} else {
XSRETURN_UNDEF;