
Possible bug in RE handling - confirmation requested
Quote:
> In my procmail+perl email sanitizing filters the following regular
> expression occurs:
> s/<BODY\s+(([^">]+("(\\.|[^"])*")?)*)ONLOAD/<BODY $1 DEFANGED-ONLOAD/gi;
> I have had a report that it fails to exit on SunOS 4.1.3 + Perl 5.004,
> causing high CPU loads. I have tested it on Linux 2.0.33 + Perl 5.004_01,
> SunOS 4.1.4 + Perl 5.004_04 and Alpha OSF/1 V3.0 + Perl 5.004_04
> Can anyone confirm this for me?
> Test it by running the following text through "perl -p -e 'above-RE'":
> <body>
> <body junk>
> <body onload="">
> <body junk onload="">
> <body junk=">" onload="">
> <body junk="\">" onload="">
> Perl should *not* hang.
Thirty whacks with the stupid stick for me. The test data I was using
(of which the above is a sample) didn't tickle the RE parser into
backtracking.
I have changed the RE to a form that does not backtrack, and it now exits
quickly.
Thanks to everyone who responded, and sorry for wasting your time.
--
pgpk -a finger://gonzo.wolfenet.com/jhardin PGP key ID: 0x41EA94F5
PGP key fingerprint: A3 0C 5B C2 EF 0D 2C E5 E9 BF C8 33 A7 A9 CE 76
-----------------------------------------------------------------------
Your mouse has moved. Windows NT must be restarted for the change
to take effect. Reboot now? [ OK ]
-----------------------------------------------------------------------
76 days until Daylight Savings Time ends