[lbzip2] Add patch to fix sefgault during decompression
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Sun Oct 27 18:46:14 UTC 2013
commit 0f062caabd991320d141497ef818819c7ab5883f
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Sun Oct 27 13:19:02 2013 +0100
Add patch to fix sefgault during decompression
- Resolves: rhbz#1017957
lbzip2-rhbz1017957.patch | 18 ++++++++++++++++++
lbzip2.spec | 9 ++++++++-
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/lbzip2-rhbz1017957.patch b/lbzip2-rhbz1017957.patch
new file mode 100644
index 0000000..0aa1707
--- /dev/null
+++ b/lbzip2-rhbz1017957.patch
@@ -0,0 +1,18 @@
+--- src/decode.c
++++ src/decode.c
+@@ -250,12 +250,12 @@ make_tree(struct retriever_internal_state *rs)
+ greater than the greatest possible left-justified base).
+ */
+ assert(k == MAX_CODE_LENGTH + 1);
+- k = MAX_CODE_LENGTH;
+- while (C[k] == 0) {
++ do {
+ assert(k > MIN_CODE_LENGTH);
+- assert(B[k] == 0);
++ assert(k > MAX_CODE_LENGTH || B[k] == 0);
+ B[k--] = -1;
+ }
++ while (C[k] == 0);
+
+ /* Transform counts into indices (cumulative counts). */
+ cum = 0;
diff --git a/lbzip2.spec b/lbzip2.spec
index 38ca6ed..8808927 100644
--- a/lbzip2.spec
+++ b/lbzip2.spec
@@ -1,11 +1,13 @@
Name: lbzip2
Version: 2.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fast, multi-threaded bzip2 utility
Group: Applications/File
License: GPLv3+
URL: https://github.com/kjn/lbzip2
Source0: https://github.com/downloads/kjn/%{name}/%{name}-%{version}.tar.gz
+# From upstream commit afeccb9, resolves rhbz#1017957
+Patch0: %{name}-rhbz1017957.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -17,6 +19,7 @@ decompressor.
%prep
%setup -q
+%patch0
%build
@@ -49,6 +52,10 @@ rm -rf %{buildroot}
%changelog
+* Sun Oct 27 2013 Mikolaj Izdebski <mizdebsk at redhat.com> - 2.3-2
+- Add patch to fix sefgault during decompression
+- Resolves: rhbz#1017957
+
* Tue Oct 15 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 2.3-1
- Version bump
More information about the scm-commits
mailing list