Skip to content

fix(chain): backport PR#2180#2229

Open
oleonardolima wants to merge 2 commits into
bitcoindevkit:release/chain-0.23.xfrom
oleonardolima:backport/pr-2180
Open

fix(chain): backport PR#2180#2229
oleonardolima wants to merge 2 commits into
bitcoindevkit:release/chain-0.23.xfrom
oleonardolima:backport/pr-2180

Conversation

@oleonardolima

@oleonardolima oleonardolima commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

It's a backport for the the bdk_chain fix introduced by #2180. If you're interested in the original fix, check the original PR for discussion/rationale.

Changelog notice

### Fixed

- Prevent integer overflow in SpkIterator::new_with_range

Checklists

All Submissions:

oleonardolima and others added 2 commits June 15, 2026 11:05
The start and end bound calculations used unchecked addition which
overflows when given `u32::MAX`, causing the iterator to silently produce
wrong results (e.g., an empty iterator for `0..=u32::MAX` in release
mode). Use `saturating_add` to handle the boundary correctly.

Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>
@oleonardolima oleonardolima self-assigned this Jun 15, 2026
@oleonardolima oleonardolima added the backport A bug fix or security patch to be ported to a previous release label Jun 15, 2026
@oleonardolima oleonardolima moved this to Needs Review in BDK Chain Jun 15, 2026
@oleonardolima oleonardolima added this to the Chain 0.23.4 milestone Jun 15, 2026
@oleonardolima oleonardolima marked this pull request as ready for review June 15, 2026 14:16

@luisschwab luisschwab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 381daf9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport A bug fix or security patch to be ported to a previous release

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants