/[packages]/updates/5/perl-libintl-perl/current/SOURCES/libintl-perl-CVE-2016-1238.patch
ViewVC logotype

Contents of /updates/5/perl-libintl-perl/current/SOURCES/libintl-perl-CVE-2016-1238.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1187521 - (show annotations) (download)
Sat Dec 30 05:26:43 2017 UTC (19 months, 2 weeks ago) by luigiwalser
File size: 935 byte(s)
rediff patch to fix CVE-2017-1238
1 diff --git a/lib/Locale/Messages.pm b/lib/Locale/Messages.pm
2 index e3fcd7b..b576b91 100755
3 --- a/lib/Locale/Messages.pm
4 +++ b/lib/Locale/Messages.pm
5 @@ -31,6 +31,8 @@ $VERSION = '1.23';
6 # Try to load the C version first.
7 $package = 'gettext_xs';
8 my $can_xs = 1;
9 +local @INC = @INC;
10 +pop @INC if $INC[-1] eq '.';
11 eval <<'EOF';
12 require Locale::gettext_xs;
13 my $version = Locale::gettext_xs::__gettext_xs_version();
14 @@ -200,9 +204,15 @@ sub select_package {
15 my $filename = "Locale::$pkg";
16 $filename =~ s{::|\'}{/};
17 $filename .= '.pm';
18 - eval { require $filename };
19 + eval {
20 + local @INC = @INC;
21 + pop @INC if $INC[-1] eq '.';
22 + require $filename
23 + };
24 $package = $pkg unless $@;
25 } else {
26 + local @INC = @INC;
27 + pop @INC if $INC[-1] eq '.';
28 eval "require Locale::gettext_xs";
29 $package = 'gettext_xs' unless $@;
30 }

  ViewVC Help
Powered by ViewVC 1.1.26