in reply to Re: In place edit and printf
in thread In place edit and printf
Your solution has two problems:
1) Injection Vulnerability
You don't escape the %s in $1 and $'. Pass them as arguments to printf instead, adding %s in the format string where necessary
2) Performance Leak
Using $' can cause other (unrelated) regexp in your program to slow down. Add (.*) to the end of the regexp and use $2 instead of $'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: In place edit and printf
by TedYoung (Deacon) on Dec 09, 2005 at 17:01 UTC |