public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-dulwich] rawhide: 1.2.22
@ 2026-11-25 15:13 Gwyn Ciesla
0 siblings, 0 replies; only message in thread
From: Gwyn Ciesla @ 2026-11-25 15:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-dulwich
Branch : rawhide
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=rawhide
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 15:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 15:13 [rpms/python-dulwich] rawhide: 1.2.22 Gwyn Ciesla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox