Add zero check to randrange() (@tecnovert) #15359

pull kewde wants to merge 1 commits into bitcoin:master from kewde:patch-2 changing 1 files +9 −5
  1. kewde commented at 8:53 PM on February 6, 2019: contributor

    No description provided.

  2. Prevent undefined behavior of randrange() (@tecnovert) a7ecb244b7
  3. kewde renamed this:
    Prevent undefined behavior of randrange() (@tecnovert)
    Add zero check to randrange() (@tecnovert)
    on Feb 6, 2019
  4. gmaxwell commented at 8:56 PM on February 6, 2019: contributor

    Returning 0 in that case is wrong: 0 is outside of the requested range, just less obviously than an absurdly high value.

  5. kewde closed this on Feb 6, 2019

  6. kewde deleted the branch on Feb 6, 2019
  7. DrahtBot locked this on Dec 16, 2021
Contributors

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-29 03:15 UTC

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