Patch Safe.pm (see
http://use.perl.org/articles/02/10/06/1118222.shtml?tid=5). Reported by: kuriyama
This commit is contained in:
parent
987da70edf
commit
880a91bea2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=79415
4 changed files with 42 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= perl
|
||||
PORTVERSION= ${PERL_VER}
|
||||
PORTREVISION= 11
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= lang devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \
|
||||
${MASTER_SITE_LOCAL:S/$/:local/}
|
||||
|
|
20
lang/perl5.6/files/patch-Safe.pm
Normal file
20
lang/perl5.6/files/patch-Safe.pm
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- ext/Opcode/Safe.pm.orig Fri Feb 23 03:57:54 2001
|
||||
+++ ext/Opcode/Safe.pm Mon Apr 21 16:24:39 2003
|
||||
@@ -213,7 +213,7 @@ sub reval {
|
||||
# Create anon sub ref in root of compartment.
|
||||
# Uses a closure (on $expr) to pass in the code to be executed.
|
||||
# (eval on one line to keep line numbers as expected by caller)
|
||||
- my $evalcode = sprintf('package %s; sub { eval $expr; }', $root);
|
||||
+ my $evalcode = sprintf('package %s; sub { @_ = (); eval $expr; }', $root);
|
||||
my $evalsub;
|
||||
|
||||
if ($strict) { use strict; $evalsub = eval $evalcode; }
|
||||
@@ -227,7 +227,7 @@ sub rdo {
|
||||
my $root = $obj->{Root};
|
||||
|
||||
my $evalsub = eval
|
||||
- sprintf('package %s; sub { do $file }', $root);
|
||||
+ sprintf('package %s; sub { @_ = (); do $file }', $root);
|
||||
return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= perl
|
||||
PORTVERSION= ${PERL_VER}
|
||||
PORTREVISION= 11
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= lang devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \
|
||||
${MASTER_SITE_LOCAL:S/$/:local/}
|
||||
|
|
20
lang/perl5/files/patch-Safe.pm
Normal file
20
lang/perl5/files/patch-Safe.pm
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- ext/Opcode/Safe.pm.orig Fri Feb 23 03:57:54 2001
|
||||
+++ ext/Opcode/Safe.pm Mon Apr 21 16:24:39 2003
|
||||
@@ -213,7 +213,7 @@ sub reval {
|
||||
# Create anon sub ref in root of compartment.
|
||||
# Uses a closure (on $expr) to pass in the code to be executed.
|
||||
# (eval on one line to keep line numbers as expected by caller)
|
||||
- my $evalcode = sprintf('package %s; sub { eval $expr; }', $root);
|
||||
+ my $evalcode = sprintf('package %s; sub { @_ = (); eval $expr; }', $root);
|
||||
my $evalsub;
|
||||
|
||||
if ($strict) { use strict; $evalsub = eval $evalcode; }
|
||||
@@ -227,7 +227,7 @@ sub rdo {
|
||||
my $root = $obj->{Root};
|
||||
|
||||
my $evalsub = eval
|
||||
- sprintf('package %s; sub { do $file }', $root);
|
||||
+ sprintf('package %s; sub { @_ = (); do $file }', $root);
|
||||
return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
|
||||
}
|
||||
|
Loading…
Reference in a new issue