This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb26d8b
)
Update the is_tainted() example implementation.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 6 Sep 2001 13:30:32 +0000
(13:30 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 6 Sep 2001 13:30:32 +0000
(13:30 +0000)
p4raw-id: //depot/perl@11914
pod/perlsec.pod
patch
|
blob
|
blame
|
history
diff --git
a/pod/perlsec.pod
b/pod/perlsec.pod
index
87d1f7b
..
e8d44c3
100644
(file)
--- a/
pod/perlsec.pod
+++ b/
pod/perlsec.pod
@@
-125,10
+125,7
@@
nearby CPAN mirror, and included in Perl starting from the release 5.8.0.
Or you may be able to use the following I<is_tainted()> function.
sub is_tainted {
- return ! eval {
- join('',@_), kill 0;
- 1;
- };
+ return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 };
}
This function makes use of the fact that the presence of tainted data