init: Add bounds checking to -port #24344

pull thonkle wants to merge 1 commits into bitcoin:master from thonkle:disallow-port-0 changing 1 files +5 −0
  1. thonkle commented at 11:34 pm on February 14, 2022: none

    Specifying ports outside of the bounds of 1 - 65535 give unexpected behaviors:

    • 0 assigns a random port
    • less than 0 underflows
    • greater than 65535 overflows and then assigns a random port

    This patch alerts the user that port numbers in these ranges are invalid.

  2. init: Add bounds checking to -port 5dee44b9f7
  3. thonkle commented at 11:36 pm on February 14, 2022: none

    Since this patch touches the init pathway, it does not appear to be a good candidate for unit testing. And a functional test case for this behavior did not appear to belong in any existing functional test (a new test seems too heavy handed).

    Please advise.

  4. ghost commented at 11:49 pm on February 14, 2022: none
    Isn’t this already being addressed in #22087 ?
  5. thonkle commented at 0:32 am on February 15, 2022: none

    Isn’t this already being addressed in #22087 ?

    Looks like it. I will comment there since the bounds checking is not sufficient.

  6. laanwj added the label Utils/log/libs on Feb 15, 2022
  7. DrahtBot commented at 1:05 pm on September 23, 2022: contributor

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16545 (refactor: Implement missing error checking for ArgsManager flags by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  8. fanquake commented at 3:27 pm on October 2, 2022: member
    Closing as a duplicate of #22087. The comments were left and addressed in that PR.
  9. fanquake closed this on Oct 2, 2022

  10. fanquake referenced this in commit 5fc3939850 on Oct 12, 2022
  11. bitcoin locked this on Oct 2, 2023

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: 2024-07-05 19:13 UTC

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