Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/t/lib/warnings/taint

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


  taint.c AOK

  Insecure %s%s while running with -T switch

__END__
-T
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
chdir $a ;
print "xxx\n" ;
EXPECT
Insecure dependency in chdir while running with -T switch at - line 5.
########
-TU
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
chdir $a ;
print "xxx\n" ;
EXPECT
xxx
########
-TU
--FILE-- abc
def
--FILE--
# taint.c
open(FH, "<abc") ;
$a = <FH> ;
close FH ;
use warnings 'taint' ;
chdir $a ;
print "xxx\n" ;
no warnings 'taint' ;
chdir $a ;
print "yyy\n" ;
EXPECT
Insecure dependency in chdir while running with -T switch at - line 6.
xxx
yyy

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].