Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8e40d78a05
!14 add make check in spec
From: @znzjugod 
Reviewed-by: @ziyangc 
Signed-off-by: @ziyangc
2023-02-18 03:29:34 +00:00
znzjugod
a27c9ce256
update lz4.spec.
Signed-off-by: znzjugod <zhangnan134@huawei.com>
2023-02-16 11:38:45 +00:00
openeuler-ci-bot
8a6f4a1cd2
!13 lz4: upgrade to 1.9.4
From: @lvying6 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2023-01-19 07:22:34 +00:00
Lv Ying
cc82a502ab lz4: upgrade to 1.9.4 2023-01-19 14:54:06 +08:00
openeuler-ci-bot
f2c04b4349
!10 add _FORTIFY_SOURCE add enable check
From: @renxichen 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-06-25 03:07:09 +00:00
rwx403335
b894850fd7 add _FORTIFY_SOURCE add enable check 2022-06-20 17:10:53 +08:00
openeuler-ci-bot
575ac7aa65 !8 lz4 delete -Sgit from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-08-19 08:24:43 +00:00
chenyanpanHW
01ffb5f788
delete -Sgit from %autosetup, and delete BuildRequires git 2021-07-30 23:06:25 +08:00
openeuler-ci-bot
c0a12e2011 !6 fix CVE-2021-3520
From: @tong_1001
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-06-21 02:32:04 +00:00
tong_1001
fdfe95197d fix CVE-2021-3520 2021-06-19 09:16:08 +08:00
4 changed files with 23 additions and 44 deletions

View File

@ -1,38 +0,0 @@
From 2c67902d594f7ae37b68cef1692b823b4b497e92 Mon Sep 17 00:00:00 2001
From: "W. Felix Handte" <w@felixhandte.com>
Date: Thu, 18 Jul 2019 12:41:12 -0400
Subject: [PATCH 3/3] Fix Data Corruption Bug when Streaming with an Attached
Dict in HC Mode
This diff fixes an issue in which we failed to clear the `dictCtx` in HC
compression. The `dictCtx` is not supposed to be used when an `extDict` is
present: matches found in the `dictCtx` do not account for the presence of an
`extDict` segment, and their offsets are therefore miscalculated when one is
present. This can lead to data corruption.
This diff clears the `dictCtx` whenever setting an `extDict`.
This issue was uncovered by @terrelln's fuzzing work.
---
lib/lz4hc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index b62e085..98813a6 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -940,6 +940,11 @@ static void LZ4HC_setExternalDict(LZ4HC_CCtx_internal* ctxPtr, const BYTE* newBl
if (ctxPtr->end >= ctxPtr->base + ctxPtr->dictLimit + 4)
LZ4HC_Insert (ctxPtr, ctxPtr->end-3); /* Referencing remaining dictionary content */
+ /* cannot reference an extDict and a dictCtx at the same time */
+ if (ctxPtr->dictCtx != NULL) {
+ ctxPtr->dictCtx = NULL;
+ }
+
/* Only one memory segment for extDict, so any previous extDict is lost at this stage */
ctxPtr->lowLimit = ctxPtr->dictLimit;
ctxPtr->dictLimit = (U32)(ctxPtr->end - ctxPtr->base);
--
1.8.3.1

Binary file not shown.

BIN
lz4-1.9.4.tar.gz Normal file

Binary file not shown.

View File

@ -1,18 +1,17 @@
Name: lz4
Version: 1.9.3
Release: 1
Version: 1.9.4
Release: 2
Summary: Extremely fast compression algorithm
License: GPLv2+ and BSD
URL: https://lz4.github.io/lz4/
Source0: https://github.com/lz4/lz4/archive/v%{version}/%{name}-%{version}.tar.gz
Patch6000: Fix-Data-Corruption-Bug-when-Streaming-with-an-Attac.patch
Provides: %{name}-libs = %{version}-%{release}
Obsoletes: %{name} < 1.7.5-3
Obsoletes: %{name}-libs
BuildRequires: gcc git
BuildRequires: gcc
%description
LZ4 is lossless compression algorithm, providing compression speed > 500 MB/s per
@ -33,16 +32,19 @@ applications using liblz4 library.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1 -Sgit
%autosetup -n %{name}-%{version} -p1
cp %{_builddir}/%{name}-%{version}/lib/LICENSE %{_builddir}/%{name}-%{version}/LICENSE-lib
%build
export MOREFLAGS="-g"
export MOREFLAGS="-g -D_FORTIFY_SOURCE=2 -O2"
%make_build
%install
%make_install LIBDIR=%{_libdir} PREFIX=%{_prefix}
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -68,6 +70,21 @@ export MOREFLAGS="-g"
%{_mandir}/man1/unlz4.1*
%changelog
* Thu Feb 16 2023 zhangnan <zhangnan134@huawei.com> - 1.9.4-2
- add make check in spec
* Thu Jan 19 2023 Lv Ying <lvying6@huawei.com> - 1.9.4-1
- upgrade to 1.9.4-1
* Mon Jun 20 2022 renhongxun <renhongxun@h-partners.com> - 1.9.3-4
- add _FORTIFY_SOURCE add enable check
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.9.3-3
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
* Sat Jun 19 2021 shixuantong <shixuantong@huawei.com> - 1.9.3-2
- fix CVE-2021-3520
* Thu Jan 28 2021 liudabo <liudabo1@huawei.com> - 1.9.3-1
- upgrade version to 1.9.3