I have made a formal bugreport to with perlbug for this now.

This causes a segfault:

perl -e'("X"x3529) =~ /( (?: \\. | [^\$] ){1,4000} )/gx;'

Using perl 5.8.0-15, Debian package.


And here is a diff for Template::Parser to fix the problem:

--- Parser.pm.orig      2002-07-30 14:44:58.000000000 +0200
+++ Parser.pm   2003-02-21 22:48:37.000000000 +0100
@@ -401,7 +401,7 @@

    while ($text =~
            /
-           ( (?: \\. | [^\$] ){1,4000} ) # escaped or non-'$' character [$1]
+           ( (?: \\. | [^\$] ){1,3000} ) # escaped or non-'$' character [$1]
            |
           ( \$ (?:                 # embedded variable            [$2]
             (?: \{ ([^\}]*) \} )   # ${ ... }                     [$3]





Jonas Liljegren <[EMAIL PROTECTED]> writes:

> I localized the part that segfaults to a regexp on line 402.
>
> It parses a file whithout any template directives.
>
> The file can be 3528 bytes large.  A file larger than 3528 causes a
> segfault.
>
> Using Perl 5.8.0-15 (Debian)
>
> -- 
> / Jonas  -  http://jonas.liljegren.org/myself/en/index.html
>
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
> http://lists.template-toolkit.org/mailman/listinfo/templates
>

-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to