Files
bitcoin/src
Ava Chow b388674acf Merge bitcoin/bitcoin#35872: rpc: avoid descriptor range counter overflow
264555af3c rpc: avoid descriptor range counter overflow (Lőrinc)
143a13fb2b test: characterize descriptor range endpoint (Lőrinc)

Pull request description:

  **Problem:** The authenticated `scantxoutset`, `scanblocks`, `getdescriptoractivity`, `utxoupdatepsbt`, and `descriptorprocesspsbt` RPCs share a descriptor expansion helper that iterates inclusive `int64_t` ranges with an `int` counter.
  A ranged descriptor with an explicit `[begin, end]` range ending at `2^31 - 1` expands that valid position, then overflows when advancing the counter to exit the loop.
  Trap-enabled builds terminate, while other builds invoke undefined behavior.

  **Fix:** Use `int64_t` for loop control so the one-past-the-end value is representable and every position passed to `Descriptor::Expand()` remains within its existing `int` range.

  Related: [#26275](https://github.com/bitcoin/bitcoin/pull/26275) fixed the same endpoint overflow in `deriveaddresses`.

ACKs for top commit:
  achow101:
    ACK 264555af3c
  polespinasa:
    ACK 264555af3c
  sedited:
    ACK 264555af3c

Tree-SHA512: 4326182b5897b6f6672e5f7c7296eafdbb6e3b5ed901d61e8fa2cff9b19d372bb8adb88902368dc520ed400e12dd5264ea68677d9ce0feec76fa2ef55fa0d2f4
2026-08-06 13:07:06 -07:00
..
2026-06-26 09:56:01 -07:00
2026-08-03 12:03:56 -07:00
2026-08-03 12:03:56 -07:00
2026-06-04 21:58:56 +10:00
2026-04-20 08:55:51 +02:00
2026-02-25 14:36:19 -08:00
2026-07-22 12:38:13 -07:00
2026-07-23 12:06:32 +02:00
2026-07-23 12:06:32 +02:00
2026-08-03 12:03:56 -07:00
2025-11-14 01:17:38 +02:00
2026-04-28 10:37:15 +02:00