Author: mcbrown
Date: 2007-04-02 13:32:12 +0200 (Mon, 02 Apr 2007)
New Revision: 5680
Log:
Meta-quoting the source text so that the regular expression doesn't try to sap infinite amounts of memory when replacing strings that contain regular expression artifacts.
Modified:
trunk/tools/idremap.pl
Modified: trunk/tools/idremap.pl
===================================================================
--- trunk/tools/idremap.pl 2007-04-02 10:32:01 UTC (rev 5679)
+++ trunk/tools/idremap.pl 2007-04-02 11:32:12 UTC (rev 5680)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 1; 518 bytes
@@ -150,7 +150,8 @@
{
$destrepl = sprintf('<ulink url="%s">%s</ulink>',$url,$content);
}
- $filesrc =~ s/$match/$destrepl/msg;
+ my $sourcematch = quotemeta($match);
+ $filesrc =~ s/$sourcematch/$destrepl/msg;
}
}
}
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r5680 - trunk/tools | mcbrown | 2 Apr |