1 taint.c AOK 2 3 Insecure %s%s while running with -T switch 4 5__END__ 6-T 7--FILE-- abc 8def 9--FILE-- 10# taint.c 11open(FH, "<abc") ; 12$a = <FH> ; 13close FH ; 14chdir $a ; 15print "xxx\n" ; 16EXPECT 17Insecure dependency in chdir while running with -T switch at - line 5. 18######## 19-TU 20--FILE-- abc 21def 22--FILE-- 23# taint.c 24open(FH, "<abc") ; 25$a = <FH> ; 26close FH ; 27chdir $a; 28no warnings 'taint' ; 29chdir $a ; 30print "xxx\n" ; 31use warnings 'taint' ; 32chdir $a ; 33print "yyy\n" ; 34EXPECT 35Insecure dependency in chdir while running with -T switch at - line 5. 36Insecure dependency in chdir while running with -T switch at - line 10. 37xxx 38yyy 39######## 40-t 41--FILE-- abc 42def 43--FILE-- 44# taint.c 45open(FH, "<abc") ; 46$a = <FH> ; 47close FH ; 48chdir $a; 49no warnings 'taint' ; 50chdir $a ; 51print "xxx\n" ; 52use warnings 'taint' ; 53chdir $a ; 54print "yyy\n" ; 55EXPECT 56Insecure dependency in chdir while running with -t switch at - line 5. 57Insecure dependency in chdir while running with -t switch at - line 10. 58xxx 59yyy 60