From: Karl Williamson Date: Tue, 18 Feb 2014 18:45:48 +0000 (-0700) Subject: lib/locale.t: Untaint before checking if next thing taints X-Git-Tag: upstream/5.20.0~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9486279ceb5a3e105081b7470810dca288230535;p=platform%2Fupstream%2Fperl.git lib/locale.t: Untaint before checking if next thing taints The tests weren't testing what they purported to, as we should be sure to start with untained values to see if the operation taints. --- diff --git a/lib/locale.t b/lib/locale.t index b195394..1dce940 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -159,6 +159,14 @@ check_taint $+; check_taint $1; check_taint_not $2; +/(.)/; # untaint $&, $`, $', $+, $1. +check_taint_not $&, '/(.)/'; +check_taint_not $`; +check_taint_not $'; +check_taint_not $+; +check_taint_not $1; +check_taint_not $2; + /(\s)/; # taint $&, $`, $', $+, $1. check_taint $&; check_taint $`; @@ -167,6 +175,9 @@ check_taint $+; check_taint $1; check_taint_not $2; +/(.)/; # untaint $&, $`, $', $+, $1. +check_taint_not $&, '/(.)/'; + /(\S)/; # taint $&, $`, $', $+, $1. check_taint $&; check_taint $`;