From c9adf8fb6f7aa7d40db591777b3584649b28ff74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Thu, 3 Nov 2016 14:49:51 +0100 Subject: Avoid infinite loop in h2xs tool if enum and type have the same name
--- ...130001-h2xs-avoid-infinite-loop-for-enums.patch | 32 ++++++++++++++++++++++ perl.spec | 8 ++++++ 2 files changed, 40 insertions(+) create mode 100644 perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch diff --git a/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch b/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch new file mode 100644 index 0000000..9b4f197 --- /dev/null +++ b/perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch @@ -0,0 +1,32 @@ +From 9ce5bf4c39e28441410672f39b5ee1c4569967f8 Mon Sep 17 00:00:00 2001 +From: Hugo van der Sanden <h...@crypt.org> +Date: Fri, 28 Oct 2016 13:27:23 +0100 +Subject: [PATCH] [perl #130001] h2xs: avoid infinite loop for enums +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +'typedef enum x { ... } x' causes h2xs to enter a substitution loop while +trying to write the typemap file. + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + utils/h2xs.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/h2xs.PL b/utils/h2xs.PL +index 8fda87b..f9063cb 100644 +--- a/utils/h2xs.PL ++++ b/utils/h2xs.PL +@@ -1034,7 +1034,7 @@ if( ! $opt_X ){ # use XS, unless it was disabled + } + } + { local $" = '|'; +- $typedef_rex = qr(\b(?<!struct )(?:@good_td)\b) if @good_td; ++ $typedef_rex = qr(\b(?<!struct )(?<!enum )(?:@good_td)\b) if @good_td; + } + %known_fnames = map @$_[1,3], @$fdecls_parsed; # [1,3] is NAME, FULLTEXT + if ($fmask) { +-- +2.7.4 + diff --git a/perl.spec b/perl.spec index d81c9a9..adbb7c9 100644 --- a/perl.spec +++ b/perl.spec @@ -139,6 +139,10 @@ Patch44: perl-5.24.0-rt-129336-perl-i-u-erroneously-interpreted-as-u.patc # in upstream after 5.25.6 Patch45: perl-5.22.2-regcomp.c-fix-perl-129950-fix-firstchar-bitmap-under.patch +# Avoid infinite loop in h2xs tool if enum and type have the same name, +# RT#130001, in upstream after 5.25.6 +Patch46: perl-5.25.6-perl-130001-h2xs-avoid-infinite-loop-for-enums.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -2197,6 +2201,7 @@ Perl extension for Version Objects %patch43 -p1 %patch44 -p1 %patch45 -p1 +%patch46 -p1 %patch200 -p1 %patch201 -p1 @@ -2234,6 +2239,7 @@ perl -x patchlevel.h \ 'Fedora Patch43: Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350)' \ 'Fedora Patch44: Fix parsing perl options in shell bang line (RT#129336)' \ 'Fedora Patch45: Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950)' \ + 'Fedora Patch46: Avoid infinite loop in h2xs tool if enum and type have the same name (RT130001)' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -4256,6 +4262,8 @@ popd - Fix crash when matching UTF-8 string with non-UTF-8 substrings (RT#129350) - Fix parsing perl options in shell bang line (RT#129336) - Fix firstchar bitmap under UTF-8 with prefix optimization (RT#129950) +- Avoid infinite loop in h2xs tool if enum and type have the same name + (RT130001) * Wed Aug 03 2016 Jitka Plesnikova <jples...@redhat.com> - 4:5.22.2-354 - Avoid loading optional modules from default . (CVE-2016-1238) -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl.git/commit/?h=f23&id=c9adf8fb6f7aa7d40db591777b3584649b28ff74 _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org