Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #19063

Closed (moved)
(moved)
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