public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Gwyn Ciesla <gwync@protonmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-dulwich] f45: 1.2.22
Date: Wed, 25 Nov 2026 15:13:56 GMT	[thread overview]
Message-ID: <179561963610.1.16077218353172675953.rpms-python-dulwich-ba9a130ad2f9@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-dulwich
Branch : f45
Commit : ba9a130ad2f9a0b74d053a19467c0572e594cc55
Author : Gwyn Ciesla <gwync@protonmail.com>
Date   : 2026-11-25T09:13:12-06:00
Stats  : +3/-107 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/python-dulwich/c/ba9a130ad2f9a0b74d053a19467c0572e594cc55?branch=f45

Log:
1.2.22

---
diff --git a/.gitignore b/.gitignore
index d9e7ff8..e4b518e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,3 +96,4 @@
 /dulwich-1.2.19.tar.gz
 /dulwich-1.2.20.tar.gz
 /dulwich-1.2.21.tar.gz
+/dulwich-1.2.22.tar.gz

diff --git a/ce4136a3555c5c6e75ec4d94b3945605af4ff580.patch b/ce4136a3555c5c6e75ec4d94b3945605af4ff580.patch
deleted file mode 100644
index cb32dda..0000000
--- a/ce4136a3555c5c6e75ec4d94b3945605af4ff580.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From ce4136a3555c5c6e75ec4d94b3945605af4ff580 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk>
-Date: Thu, 5 Nov 2026 19:29:48 +0000
-Subject: [PATCH] pack: reject oversized object counts before __len__ (#2574)
-
-On 32-bit platforms Py_ssize_t is 32-bit signed, so a corrupt pack index
-with fanout[-1] above 2**31-1 made __len__ raise OverflowError before the
-size check could fail with AssertionError. Use _fan_out_table[-1] directly.
----
- NEWS            |  6 ++++++
- dulwich/pack.py | 37 +++++++++++++++++++++++++------------
- 2 files changed, 31 insertions(+), 12 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index a556b7147d..1cd8e8d48a 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,3 +1,9 @@
-+1.2.22	UNRELEASED
-+
-+ * Reject pack indexes whose fanout claims more than 2**31-1 objects on
-+   32-bit platforms with AssertionError rather than OverflowError.
-+   (Jelmer Vernooij, #2574)
-+
- 1.2.21	2026-11-04
- 
-  * SECURITY: Refuse ``porcelain.submodule_update`` when the submodule path
-diff --git a/dulwich/pack.py b/dulwich/pack.py
-index 319245b3ce..45473c3ab5 100644
---- a/dulwich/pack.py
-+++ b/dulwich/pack.py
-@@ -1385,11 +1385,14 @@ def __init__(
-         self._fan_out_table = self._read_fan_out_table(0)
-         self.hash_size = self.object_format.oid_length
-         self._entry_size = 4 + self.hash_size
-+        # Avoid len(self) here: on 32-bit platforms a __len__ return above
-+        # 2**31-1 raises OverflowError before we can reject the index.
-+        num_objects = self._fan_out_table[-1]
-         file_size = len(self._contents)
--        minimum_size = 0x100 * 4 + len(self) * self._entry_size
-+        minimum_size = 0x100 * 4 + num_objects * self._entry_size
-         if file_size < minimum_size:
-             raise AssertionError(
--                f"pack index claims {len(self)} objects but file is only "
-+                f"pack index claims {num_objects} objects but file is only "
-                 f"{file_size} bytes (needs at least {minimum_size})"
-             )
- 
-@@ -1444,10 +1447,15 @@ def __init__(
-         self._fan_out_table = self._read_fan_out_table(8)
-         self.hash_size = self.object_format.oid_length
-         self._name_table_offset = 8 + 0x100 * 4
--        self._crc32_table_offset = self._name_table_offset + self.hash_size * len(self)
--        self._pack_offset_table_offset = self._crc32_table_offset + 4 * len(self)
--        self._pack_offset_largetable_offset = self._pack_offset_table_offset + 4 * len(
--            self
-+        # Avoid len(self) here: on 32-bit platforms a __len__ return above
-+        # 2**31-1 raises OverflowError before we can reject the index.
-+        num_objects = self._fan_out_table[-1]
-+        self._crc32_table_offset = (
-+            self._name_table_offset + self.hash_size * num_objects
-+        )
-+        self._pack_offset_table_offset = self._crc32_table_offset + 4 * num_objects
-+        self._pack_offset_largetable_offset = (
-+            self._pack_offset_table_offset + 4 * num_objects
-         )
-         # Reject claims the file is obviously too small to back. A corrupt
-         # (or hostile) ``.idx`` with fanout[-1] = 0xFFFFFFFF would otherwise
-@@ -1460,7 +1468,7 @@ def __init__(
-         minimum_size = self._pack_offset_largetable_offset
-         if file_size < minimum_size:
-             raise AssertionError(
--                f"pack index claims {len(self)} objects but file is only "
-+                f"pack index claims {num_objects} objects but file is only "
-                 f"{file_size} bytes (needs at least {minimum_size})"
-             )
- 
-@@ -1576,16 +1584,21 @@ def __init__(
-             16
-         )  # After header (4 + 4 + 4 + 4)
-         self._name_table_offset = 16 + 0x100 * 4
--        self._crc32_table_offset = self._name_table_offset + self.hash_size * len(self)
--        self._pack_offset_table_offset = self._crc32_table_offset + 4 * len(self)
--        self._pack_offset_largetable_offset = self._pack_offset_table_offset + 4 * len(
--            self
-+        # Avoid len(self) here: on 32-bit platforms a __len__ return above
-+        # 2**31-1 raises OverflowError before we can reject the index.
-+        num_objects = self._fan_out_table[-1]
-+        self._crc32_table_offset = (
-+            self._name_table_offset + self.hash_size * num_objects
-+        )
-+        self._pack_offset_table_offset = self._crc32_table_offset + 4 * num_objects
-+        self._pack_offset_largetable_offset = (
-+            self._pack_offset_table_offset + 4 * num_objects
-         )
-         file_size = len(self._contents)
-         minimum_size = self._pack_offset_largetable_offset
-         if file_size < minimum_size:
-             raise AssertionError(
--                f"pack index claims {len(self)} objects but file is only "
-+                f"pack index claims {num_objects} objects but file is only "
-                 f"{file_size} bytes (needs at least {minimum_size})"
-             )
- 

diff --git a/python-dulwich.spec b/python-dulwich.spec
index f528f0e..48c1103 100644
--- a/python-dulwich.spec
+++ b/python-dulwich.spec
@@ -2,7 +2,7 @@
 %global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so)$
 
 Name:           python-%{srcname}
-Version:        1.2.21
+Version:        1.2.22
 Release:        %autorelease
 Summary:        Python implementation of the Git file formats and protocols
 
@@ -10,7 +10,6 @@ License:        GPL-2.0-or-later OR Apache-2.0
 URL:            https://www.dulwich.io/
 Source0:        %{pypi_source}
 
-Patch0:         ce4136a3555c5c6e75ec4d94b3945605af4ff580.patch
 
 BuildRequires:  python3-devel
 BuildRequires:  cargo-rpm-macros

diff --git a/sources b/sources
index bbcf8f1..0c2a6fb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (dulwich-1.2.21.tar.gz) = 933c40cf0cc1dce890a4d0c387ec474fbaa640d59a9eb92d7b11c3767cedafaab1c6f1e2cf16fd6927131f1a90a29cec9a126eed1abb701f1938c19bbb666200
+SHA512 (dulwich-1.2.22.tar.gz) = d370c380197cd6b85612bd7c607a40e4592458294ff196eecf0391b8fc9564ac985a1ea485088e29c1f7d81f22e6b822b006bb3106c75487d91b3182c2964a8b

                 reply	other threads:[~2026-11-25 15:13 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=179561963610.1.16077218353172675953.rpms-python-dulwich-ba9a130ad2f9@fedoraproject.org \
    --to=gwync@protonmail.com \
    --cc=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