From be9272b825629c9ff809fa54a04a7a2d50700ca2 Mon Sep 17 00:00:00 2001 From: yangmingtai Date: Thu, 27 Jul 2023 16:13:41 +0800 Subject: [PATCH] add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed --- add-Perl_my_strlcpy-and-Perl_my_strlcat.patch | 48 +++++++++++++++++++ perl.spec | 6 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 add-Perl_my_strlcpy-and-Perl_my_strlcat.patch diff --git a/add-Perl_my_strlcpy-and-Perl_my_strlcat.patch b/add-Perl_my_strlcpy-and-Perl_my_strlcat.patch new file mode 100644 index 0000000..0f1e088 --- /dev/null +++ b/add-Perl_my_strlcpy-and-Perl_my_strlcat.patch @@ -0,0 +1,48 @@ +From b6d41cba9e1a9150710f729b6108bf1adafdc4fb Mon Sep 17 00:00:00 2001 +From: root +Date: Thu, 27 Jul 2023 15:58:52 +0800 +Subject: [PATCH] add Perl_my_strlcpy and Perl_my_strlcat + +--- + util.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/util.c b/util.c +index 8103260..a193d63 100644 +--- a/util.c ++++ b/util.c +@@ -5745,7 +5745,6 @@ C. If C is smaller than the return, the excess was not appended. + + Description stolen from http://man.openbsd.org/strlcat.3 + */ +-#ifndef HAS_STRLCAT + Size_t + Perl_my_strlcat(char *dst, const char *src, Size_t size) + { +@@ -5760,7 +5759,6 @@ Perl_my_strlcat(char *dst, const char *src, Size_t size) + } + return used + length; + } +-#endif + + + /* +@@ -5779,7 +5777,6 @@ succeeded. If it is larger than C, the excess was not copied. + + Description stolen from http://man.openbsd.org/strlcpy.3 + */ +-#ifndef HAS_STRLCPY + Size_t + Perl_my_strlcpy(char *dst, const char *src, Size_t size) + { +@@ -5793,7 +5790,6 @@ Perl_my_strlcpy(char *dst, const char *src, Size_t size) + } + return length; + } +-#endif + + #if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) && (WINVER < 0x0500) + /* VC7 or 7.1, building with pre-VC7 runtime libraries. */ +-- +2.33.0 + diff --git a/perl.spec b/perl.spec index 8dfaa07..e9a1e3f 100644 --- a/perl.spec +++ b/perl.spec @@ -24,7 +24,7 @@ Name: perl License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and UCD and Public Domain and BSD Epoch: 4 Version: %{perl_version} -Release: 6 +Release: 7 Summary: A highly capable, feature-rich programming language Url: https://www.perl.org/ Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz @@ -38,6 +38,7 @@ Patch6: perl-5.35.1-Raise-version-number-in-ext-GDBM_File-GDBM_File.pm.patch Patch7: change-lib-to-lib64.patch Patch8: disable-rpath-by-default.patch Patch9: backport-fix-zlib-test-failed.patch +Patch10: add-Perl_my_strlcpy-and-Perl_my_strlcat.patch Patch6000: backport-CVE-2021-36770.patch Patch6001: backport-CVE-2023-31484.patch @@ -504,6 +505,9 @@ make test_harness %{_mandir}/man3/* %changelog +* Thu Jul 27 2023 yangmingtai - 4:5.34.0-7 +- add Perl_my_strlcpy-and-Perl_my_strlcat to fix build failed + * Mon Jun 26 2023 yangmingtai - 4:5.34.0-6 - fix CVE-2023-31486 -- Gitee