Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 316
    • Issues 316
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #19063
Closed
Open
Created May 16, 2016 by teor@teor

The tor_parse_* functions should check and warn on max < min

If a developer mistakenly calls:

tor_parse_long(value, 10, 1, UINT32_MAX, NULL, NULL);

It effectively becomes:

tor_parse_long(value, 10, 1, -1, NULL, NULL);

We can detect this by making sure min <= max, and warning if that's not the case. (I really don't think we should assert.) We should do this for all similar tor_parse_* functions.

But are there any circumstances where we should allow min to be greater than max? (it will always fail) Existing callers pass constants to this function, so it's not going to trigger for them.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking