Fix a code flow in Perl_sv_inc_nomg()

This commit is contained in:
Petr Písař 2020-10-14 15:43:34 +02:00
parent b9dda65d26
commit 6888f8d1da
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From 5777cf812c2812ea45eeb45e48979bab544d71af Mon Sep 17 00:00:00 2001
From: TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com>
Date: Thu, 8 Oct 2020 19:02:10 +0900
Subject: [PATCH] sv.c: Added missing braces in Perl_sv_inc_nomg().
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
sv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sv.c b/sv.c
index 82248e3b1f..57fd65a5b8 100644
--- a/sv.c
+++ b/sv.c
@@ -8944,9 +8944,10 @@ Perl_sv_inc_nomg(pTHX_ SV *const sv)
if (SvIsUV(sv)) {
if (SvUVX(sv) == UV_MAX)
sv_setnv(sv, UV_MAX_P1);
- else
+ else {
(void)SvIOK_only_UV(sv);
SvUV_set(sv, SvUVX(sv) + 1);
+ }
} else {
if (SvIVX(sv) == IV_MAX)
sv_setuv(sv, (UV)IV_MAX + 1);
--
2.25.4

View File

@ -252,6 +252,9 @@ Patch38: perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch
# in upstream after 5.33.2
Patch39: perl-5.33.2-mro.xs-Fix-compiler-warning.patch
# Fix a code flow in Perl_sv_inc_nomg(), in upstream after 5.33.2
Patch40: perl-5.33.2-sv.c-Added-missing-braces-in-Perl_sv_inc_nomg.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
@ -4291,6 +4294,7 @@ you're not running VMS, this module does nothing.
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch200 -p1
%patch201 -p1
@ -4337,6 +4341,7 @@ perl -x patchlevel.h \
'Fedora Patch37: Fix a mismatch with the recursive subpatterns (GH#18096)' \
'Fedora Patch38: Fix sv_collxfrm macro to respect locale' \
'Fedora Patch39: Fix an iterator signedness in handling a mro exception (GH#18155)' \
'Fedora Patch40: Fix a code flow in Perl_sv_inc_nomg()' \
'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}
@ -7053,6 +7058,7 @@ popd
* Wed Oct 14 2020 Petr Pisar <ppisar@redhat.com> - 4:5.32.0-465
- Fix sv_collxfrm macro to respect locale
- Fix an iterator signedness in handling a mro exception (GH#18155)
- Fix a code flow in Perl_sv_inc_nomg()
* Fri Sep 25 2020 Petr Pisar <ppisar@redhat.com> - 4:5.32.0-464
- Update perl-IO-Zlib metadata