Compare commits

...

No commits in common. 'c9' and 'i8c-stream-5.30' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/version-0.9928.tar.gz
SOURCES/version-0.9924.tar.gz

@ -1 +1 @@
540e5a6fa25528823dac3b0614f75a5eda3bf830 SOURCES/version-0.9928.tar.gz
86a2a814def626d269ce332df5d3df1d63b07f5f SOURCES/version-0.9924.tar.gz

@ -0,0 +1,65 @@
From eecfc44fbd6659ed35719038ecf2b029fe20cfd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 25 Nov 2019 16:48:33 +0100
Subject: [PATCH] Subject: [PATCH] ensure locale_name_on_entry isn't clobbered
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If the return value of setlocale() is static storage, the call to
setlocale(LC_NUMERIC, "C"); could overwrite it.
If the return value of setlocale() is malloced, the call to
setlocale(LC_NUMERIC, "C"); could free it.
Either way, we need to copy it. Fixes gh #17054 rt134212
Petr Písař: Ported to version-0.9924 from perl commit
bcb1da5c29c3a2534a0e43874974b83c9c8b174c.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
vutil/vutil.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/vutil/vutil.c b/vutil/vutil.c
index 5d183a0..69c8351 100644
--- a/vutil/vutil.c
+++ b/vutil/vutil.c
@@ -638,6 +638,8 @@ VER_NV:
if ( strNE(locale_name_on_entry, "C")
&& strNE(locale_name_on_entry, "POSIX"))
{
+ /* the setlocale() call might free or overwrite the name */
+ locale_name_on_entry = savepv(locale_name_on_entry);
setlocale(LC_NUMERIC, "C");
}
else { /* This value indicates to the restore code that we didn't
@@ -661,6 +663,8 @@ VER_NV:
if ( strNE(locale_name_on_entry, "C")
&& strNE(locale_name_on_entry, "POSIX"))
{
+ /* the setlocale() call might free or overwrite the name */
+ locale_name_on_entry = savepv(locale_name_on_entry);
setlocale(LC_NUMERIC, "C");
}
else { /* This value indicates to the restore code that we
@@ -710,6 +714,7 @@ VER_NV:
if (locale_name_on_entry) {
setlocale(LC_NUMERIC, locale_name_on_entry);
+ Safefree(locale_name_on_entry);
}
LC_NUMERIC_UNLOCK; /* End critical section */
@@ -718,6 +723,7 @@ VER_NV:
if (locale_name_on_entry) {
setlocale(LC_NUMERIC, locale_name_on_entry);
+ Safefree(locale_name_on_entry);
LC_NUMERIC_UNLOCK;
}
else if (locale_obj_on_entry == PL_underlying_numeric_obj) {
--
2.21.0

@ -7,13 +7,15 @@
Name: perl-version
Epoch: 7
Version: 0.99.28
%global module_version 0.9928
Release: 4%{?dist}
Version: 0.99.24
%global module_version 0.9924
Release: 441%{?dist}
Summary: Perl extension for Version Objects
License: GPL+ or Artistic
URL: https://metacpan.org/release/version
Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/version-%{module_version}.tar.gz
Source0: https://cpan.metacpan.org/authors/id/J/JP/JPEACOCK/version-%{module_version}.tar.gz
# Do not clobber memory when switching a locale, Perl GH#17054, in Perl 5.31.5
Patch0: version-0.9924-ensure-locale_name_on_entry-isn-t-clobbered.patch
# Build
BuildRequires: findutils
BuildRequires: gcc
@ -39,13 +41,13 @@ BuildRequires: perl(warnings)
BuildRequires: perl(warnings::register)
BuildRequires: perl(XSLoader)
# Tests only
BuildRequires: perl(base)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Spec)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(lib)
BuildRequires: perl(List::Util)
BuildRequires: perl(parent)
BuildRequires: perl(Test::Harness)
BuildRequires: perl(Test::More) >= 0.45
# Optional tests
@ -74,13 +76,14 @@ strongly urged to set 0.77 as a minimum in your code.
%prep
%setup -q -n version-%{module_version}
%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" UNINST=0 NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" UNINST=0 NO_PACKLIST=1
make %{?_smp_mflags}
%install
%{make_install}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%{_fixperms} %{buildroot}/*
@ -101,38 +104,8 @@ make test
%{_mandir}/man3/version::Internals.3pm*
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 7:0.99.28-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 7:0.99.28-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7:0.99.28-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Sep 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7:0.99.28-1
- 0.9928 bump
* Fri Aug 21 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7:0.99.27-458
- 0.9927 bump
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7:0.99.24-458
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7:0.99.24-457
- Perl 5.32 re-rebuild of bootstrapped packages
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 7:0.99.24-456
- Increase release to favour standalone package
* Thu Feb 06 2020 Tom Stellard <tstellar@redhat.com> - 7:0.99.24-443
- Spec file cleanups: Use make_build and make_install macros
- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
- https://fedoraproject.org/wiki/Perl/Tips#ExtUtils::MakeMake
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7:0.99.24-442
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 11 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 7:0.99.24-441
- Rebuilt for MSVSphere 8.8
* Mon Nov 25 2019 Petr Pisar <ppisar@redhat.com> - 7:0.99.24-441
- Do not clobber memory when switching a locale (Perl GH#17054)

Loading…
Cancel
Save