From b88a964c8d969bab4f9672ce14e41fe2181b11c3 Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Tue, 17 Aug 2021 09:51:51 +0800 Subject: [PATCH] Fixshift count out of range (cherry picked from commit ffffedae50b01b9bd95e43732be92556edf1e5ed) --- fix-shift-count-out-of-range.patch | 27 +++++++++++++++++++++++++++ libreswan.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 fix-shift-count-out-of-range.patch diff --git a/fix-shift-count-out-of-range.patch b/fix-shift-count-out-of-range.patch new file mode 100644 index 0000000..8364711 --- /dev/null +++ b/fix-shift-count-out-of-range.patch @@ -0,0 +1,27 @@ +From b6e379ceb25e0b0eb852960a2fe9dcb95f85cff9 Mon Sep 17 00:00:00 2001 +From: caodongxia <315816521@qq.com> +Date: Tue, 17 Aug 2021 09:34:25 +0800 +Subject: [PATCH] fix shift count out of range + +--- + programs/auto/auto.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/programs/auto/auto.in b/programs/auto/auto.in +index e69bf19..4111b53 100755 +--- a/programs/auto/auto.in ++++ b/programs/auto/auto.in +@@ -113,7 +113,9 @@ do + break + ;; + esac +- shift ++ if [ $# -gt 0 ]; then ++ shift ++ fi + done + + names= +-- +2.27.0 + diff --git a/libreswan.spec b/libreswan.spec index e8ff7fa..a982c3c 100644 --- a/libreswan.spec +++ b/libreswan.spec @@ -26,7 +26,7 @@ Name: libreswan Summary: IKE implementation for IPsec with IKEv1 and IKEv2 support Version: 4.1 -Release: 2 +Release: 3 License: GPLv2 Url: https://libreswan.org/ Source0: https://download.libreswan.org/%{name}-%{version}.tar.gz @@ -36,6 +36,7 @@ Source3: https://download.libreswan.org/cavs/ikev2.fax.bz2 Source4: openeuler-libreswan-sysctl.conf Patch0: fix-algparse-unknown-option-d.patch +Patch1: fix-shift-count-out-of-range.patch BuildRequires: audit-libs-devel BuildRequires: bison @@ -95,6 +96,7 @@ Man pages and other related help documents for libreswan. %prep %setup -q -n libreswan-%{version}%{?prever} %patch0 -p1 +%patch1 -p1 sed -i "s/-lfreebl //" mk/config.mk @@ -189,6 +191,9 @@ certutil -N -d sql:$tmpdir --empty-password %attr(0644,root,root) %doc %{_mandir}/*/* %changelog +* Tue Aug 17 2021 caodongxia - 4.1-3 +- Fix shift count out of range + * Wed Aug 11 2021 caodongxia - 4.1-2 - Fix algparse unknown option -d -- Gitee