Bug: Possible overflow calling CTxMemPoolEntry::UpdateAncestorState() #11165

issue danra opened this issue on August 26, 2017
  1. danra commented at 8:34 PM on August 26, 2017: contributor

    Describe the issue

    CTxMemPoolEntry::UpdateAncestorState() modifySigOps parameter type is int, which doesn't match update_ancestor_state's modifySigOpsCost member type which is int64_t.

    This seems to be unintentional, since the only use update_ancestor_state has is for calling CTxMemPoolEntry::UpdateAncestorState(). Therefore, either its member's type is too wide for no reason, since it is always cast to int when the function called (possibly causing an overflow!), and therefore it should be changed to be an int as well; or, CTxMemPoolEntry::UpdateAncestorState() should have its parameter type changed to int64_t to match the member.

    What version of bitcoin-core are you using?

    commit 7fd49d01dc2ea444ba4d81d0cfa17486b03c8515

  2. danra renamed this:
    Bug: CTxMemPoolEntry::UpdateAncestorState() modifySigOps parameter type doesn't match update_ancestor_state's modifySigOpsCost member type
    Bug: Possible overflow due to CTxMemPoolEntry::UpdateAncestorState() modifySigOps parameter type doesn't match update_ancestor_state's modifySigOpsCost member type
    on Aug 27, 2017
  3. danra renamed this:
    Bug: Possible overflow due to CTxMemPoolEntry::UpdateAncestorState() modifySigOps parameter type doesn't match update_ancestor_state's modifySigOpsCost member type
    Bug: Possible overflow calling CTxMemPoolEntry::UpdateAncestorState()
    on Aug 27, 2017
  4. MarcoFalke referenced this in commit 61fb80660f on Nov 10, 2017
  5. fanquake closed this on Mar 7, 2018

  6. PastaPastaPasta referenced this in commit b3702d1cb0 on Jan 17, 2020
  7. PastaPastaPasta referenced this in commit 7a73bcf66a on Jan 22, 2020
  8. PastaPastaPasta referenced this in commit 1990f11450 on Jan 22, 2020
  9. PastaPastaPasta referenced this in commit c97e8c64f8 on Jan 29, 2020
  10. ckti referenced this in commit 992a390953 on Mar 28, 2021
  11. gades referenced this in commit 6398e64d64 on Jun 24, 2021
  12. DrahtBot locked this on Sep 8, 2021

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-05-02 15:15 UTC

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