. #35064

pull flawlesscode254 wants to merge 6 commits into bitcoin:master from flawlesscode254:fix/moneystr-leading-zeros changing 5 files +13 −3
  1. flawlesscode254 commented at 4:19 AM on April 12, 2026: none

    .

  2. util/moneystr: fix potential out-of-bounds access in FormatMoney
    The loop in FormatMoney accesses str[i-2] without first checking
    that i >= 2. If str.size() < 3, this could read out of bounds.
    
    Fix by adding explicit bounds check i >= 2 to the loop condition.
    30f6c59244
  3. validation: fix potential integer underflow in reverse loop
    When block.vtx is empty, block.vtx.size() - 1 causes underflow
    since size() returns size_t (unsigned). Cast to int to prevent this.
    b0ccce1126
  4. wallet/rpc/spend: fix potential division by zero
    Check if addresses_without_amount is empty before performing
    division to prevent division by zero when no addresses are specified.
    5dfdb6d04b
  5. net_processing: fix potential integer underflow in reverse loop
    When headers vector is empty, headers.size() - 1 causes underflow
    since size() returns size_t (unsigned). Cast to int to prevent this.
    9b34475a5c
  6. util/readwritefile: fix file handle leak on fclose failure
    When fclose() fails, the file handle was not being closed before
    returning false. This could lead to a resource leak.
    bbf0f41b0d
  7. util/moneystr: reject invalid leading zeros in ParseMoney
    Reject inputs with leading zeros like '00001234' which can cause
    inconsistent representations of the same value.
    e7c801ae0a
  8. flawlesscode254 closed this on Apr 12, 2026

  9. DrahtBot commented at 4:19 AM on April 12, 2026: contributor

    LLM spam detection (✨ experimental): SPAM. The submission contains only boilerplate contributor guidance and no actual description of a bug, proposed change, rationale, or tests.

    ♻️ Automatically wiping, closing, and locking for now based on heuristics. Generally, please focus on creating high-quality, original content that demonstrates a clear understanding of the project's requirements and goals.

  10. DrahtBot renamed this:
    Fix/moneystr leading zeros
    .
    on Apr 12, 2026
  11. bitcoin locked this on Apr 12, 2026
  12. DrahtBot commented at 4:20 AM on April 12, 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. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->


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-21 09:12 UTC

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