packages/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch
Jo-Philipp Wich f73e358558 perl: ensure File::Spec::canonpath() preserves taint [CVE-2015-8607]
Beginning in PathTools 3.47 and/or perl 5.20.0, the File::Spec::canonpath()
routine returned untained strings even if passed tainted input. This defect
undermines the guarantee of taint propagation, which is sometimes used to
ensure that unvalidated user input does not reach sensitive code.

This defect was found and reported by David Golden of MongoDB, and a patch
was provided by Tony Cook.

References:

 * https://rt.perl.org/Public/Bug/Display.html?id=126862
 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8607

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-14 12:17:56 +01:00

26 lines
927 B
Diff

--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
check_count "$op $args\\\$tied_glob$postargs";
}
-$dummy = crypt $var,0; check_count 'crypt $tied, ...';
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied';
-$var = substr(chr 256,0,0);
-$dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
-$var = substr(chr 256,0,0);
-$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+SKIP: {
+ use Config;
+ skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
+
+ $dummy = crypt $var,0; check_count 'crypt $tied, ...';
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied';
+ $var = substr(chr 256,0,0);
+ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
+ $var = substr(chr 256,0,0);
+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+}
SKIP:
{