diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-27 16:20:31 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-27 16:20:31 +0000 |
commit | 26fb8f1f48b6245e35b6b73b7e98bbb26aab4dc6 (patch) | |
tree | 363a98ea6b69289cbb9761d95fc6f7dc6b332c24 /pp_sys.c | |
parent | ef75a179103f867668cdc0e80c863551b9a84c82 (diff) | |
download | perl-26fb8f1f48b6245e35b6b73b7e98bbb26aab4dc6.tar.gz |
make readdir() respect IOf_UNTAINT flag (allows untainting of directory
handles with: C<use IO::Handle; opendir D, $dir or die; D->untaint;>
p4raw-id: //depot/perl@5285
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3462,7 +3462,8 @@ PP(pp_readdir) sv = newSVpv(dp->d_name, 0); #endif #ifndef INCOMPLETE_TAINTS - SvTAINTED_on(sv); + if (!(IoFLAGS(io) & IOf_UNTAINT)) + SvTAINTED_on(sv); #endif XPUSHs(sv_2mortal(sv)); } @@ -3476,7 +3477,8 @@ PP(pp_readdir) sv = newSVpv(dp->d_name, 0); #endif #ifndef INCOMPLETE_TAINTS - SvTAINTED_on(sv); + if (!(IoFLAGS(io) & IOf_UNTAINT)) + SvTAINTED_on(sv); #endif XPUSHs(sv_2mortal(sv)); } |