diff options
author | Ricardo Signes <rjbs@semiotic.systems> | 2021-08-09 08:14:05 -0400 |
---|---|---|
committer | Ricardo Signes <rjbs@semiotic.systems> | 2021-08-09 08:24:42 -0400 |
commit | c1a937fef07c061600a0078f4cb53fe9c2136bb9 (patch) | |
tree | 78d908310c12f9f49b61d491b6d4938b637d8371 /cpan/Encode | |
parent | 84bf45ef1830422287cbd3157685e8bcfc04150f (diff) | |
download | perl-c1a937fef07c061600a0078f4cb53fe9c2136bb9.tar.gz |
Encode.pm: apply a local patch for CVE-2021-36770
I expect Encode to see a new release today.
Without this fix, Encode::ConfigLocal can be loaded from a path relative
to the current directory, because the || operator will evaluate @INC in
scalar context, putting an integer as the only value in @INC.
Diffstat (limited to 'cpan/Encode')
-rw-r--r-- | cpan/Encode/Encode.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm index a56a99947f..b96a850416 100644 --- a/cpan/Encode/Encode.pm +++ b/cpan/Encode/Encode.pm @@ -7,7 +7,8 @@ use warnings; use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; our $VERSION; BEGIN { - $VERSION = sprintf "%d.%02d", q$Revision: 3.10 $ =~ /(\d+)/g; + $VERSION = "3.10_01"; + $VERSION = eval $VERSION; require XSLoader; XSLoader::load( __PACKAGE__, $VERSION ); } @@ -65,8 +66,8 @@ require Encode::Config; eval { local $SIG{__DIE__}; local $SIG{__WARN__}; - local @INC = @INC || (); - pop @INC if $INC[-1] eq '.'; + local @INC = @INC; + pop @INC if @INC && $INC[-1] eq '.'; require Encode::ConfigLocal; }; |