diff options
Diffstat (limited to 'lib/tainted.pl')
-rw-r--r-- | lib/tainted.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tainted.pl b/lib/tainted.pl new file mode 100644 index 0000000000..6e24867a83 --- /dev/null +++ b/lib/tainted.pl @@ -0,0 +1,9 @@ +# This subroutine returns true if its argument is tainted, false otherwise. + +sub tainted { + local($@); + eval { kill 0 * $_[0] }; + $@ =~ /^Insecure/; +} + +1; |