public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/bzip3] epel9: Fix compressing streams of size being a multiple of bzip3 stream block size
Date: Tue, 08 Sep 2026 09:09:39 GMT [thread overview]
Message-ID: <178885857909.1.17356954778762997506.rpms-bzip3-5040996ae5af@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/bzip3
Branch : epel9
Commit : 5040996ae5af8c3d483cfb4a0c12e511adb4102c
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-09-08T11:07:25+02:00
Stats : +32/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/bzip3/c/5040996ae5af8c3d483cfb4a0c12e511adb4102c?branch=epel9
Log:
Fix compressing streams of size being a multiple of bzip3 stream block size
---
diff --git a/bzip3-1.5.3-fix-175.patch b/bzip3-1.5.3-fix-175.patch
new file mode 100644
index 0000000..c903d58
--- /dev/null
+++ b/bzip3-1.5.3-fix-175.patch
@@ -0,0 +1,26 @@
+From 3c60c830d14f51a905fea92c6b9ffe51d7fd3742 Mon Sep 17 00:00:00 2001
+From: Kamila Szewczyk <k@iczelia.net>
+Date: Wed, 22 Jul 2026 15:19:51 +0200
+Subject: [PATCH] fix #175
+
+---
+ src/libbz3.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/libbz3.c b/src/libbz3.c
+index 3818c65..2b9c43f 100644
+--- a/src/libbz3.c
++++ b/src/libbz3.c
+@@ -910,8 +910,7 @@ BZIP3_API int bz3_compress(u32 block_size, const u8 * const in, u8 * out, size_t
+ // Compress and write the blocks.
+ size_t in_offset = 0;
+ for (u32 i = 0; i < n_blocks; i++) {
+- s32 size = block_size;
+- if (i == n_blocks - 1) size = in_size % block_size;
++ s32 size = (s32)(i == n_blocks - 1 ? in_size - in_offset : block_size);
+ memcpy(compression_buf, in + in_offset, size);
+ s32 out_size_block = bz3_encode_block(state, compression_buf, size);
+ if (bz3_last_error(state) != BZ3_OK) {
+--
+2.55.0
+
diff --git a/bzip3.spec b/bzip3.spec
index 297d524..3ced5d9 100644
--- a/bzip3.spec
+++ b/bzip3.spec
@@ -62,6 +62,10 @@ Patch7: bzip3-1.4.0-Fix-memory-leak-by-compression_buf-in-bz3_decompress
# Fix decompressing large incompressible streams, in upstream after 1.5.3,
# <https://github.com/iczelia/bzip3/issues/174>
Patch8: bzip3-1.5.3-fix-174.patch
+# Fix compressing streams of size being a multiple of bzip3 stream block size,
+# in upstream after 1.5.3,
+# <https://github.com/iczelia/bzip3/issues/175>
+Patch9: bzip3-1.5.3-fix-175.patch
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: automake
@@ -185,6 +189,8 @@ fi
%changelog
* Tue Sep 08 2026 Petr Pisar <ppisar@redhat.com> - 1.3.1-5
- Fix decompressing large incompressible streams (upstream GH#174)
+- Fix compressing streams of size being a multiple of bzip3 stream block size
+ (upstream GH#175)
* Wed Apr 30 2025 Petr Pisar <ppisar@redhat.com> - 1.3.1-4
- Improve memory estimation in bz3_compress()
reply other threads:[~2026-09-08 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178885857909.1.17356954778762997506.rpms-bzip3-5040996ae5af@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox