fuzz: Use CAmount for storing best_waste #34939

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:waste-fuzz-overflow changing 1 files +1 −1
  1. achow101 commented at 12:32 AM on March 28, 2026: member

    Waste is a CAmount, which is an int64_t. This will overflow an int, so best_waste should also be a CAmount.

    Fixes #34936

  2. fuzz: Use CAmount for storing best_waste
    Waste is a CAmount, which is an int64_t. This will overflow an int, so
    `best_waste` should also be a `CAmount`.
    890a09b1e4
  3. DrahtBot added the label Fuzzing on Mar 28, 2026
  4. DrahtBot commented at 12:32 AM on March 28, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK murchandamus, furszy

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. murchandamus commented at 1:06 AM on March 28, 2026: member

    Tested againts the fuzz input provided in #32894 / #34936. Thanks Ava!

    ACK 890a09b1e49925315a5636f29cc5af36928fe092

  6. furszy commented at 2:54 AM on March 28, 2026: member

    ACK 890a09b1e49925315a5636f29cc5af36928fe092

  7. fanquake added this to the milestone 31.0 on Mar 28, 2026
  8. fanquake added the label Needs Backport (31.x) on Mar 28, 2026
  9. yancyribbens commented at 2:02 PM on March 28, 2026: contributor

    best waste should be 2100000000000000 at most if in sats, right? Makes sense that this is larger than int max of 2,147,483,647.

  10. fanquake merged this on Mar 30, 2026
  11. fanquake closed this on Mar 30, 2026

  12. fanquake referenced this in commit 683f9034eb on Mar 30, 2026
  13. fanquake removed the label Needs Backport (31.x) on Mar 30, 2026
  14. fanquake commented at 11:20 AM on March 30, 2026: member

    Backported to 31.x in #34942.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 00:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me