[tor-bugs] #21872 [Core Tor/Tor]: encoded length macros for baseXX encodings

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Apr 5 18:49:01 UTC 2017


#21872: encoded length macros for baseXX encodings
------------------------------+--------------------------------
     Reporter:  catalyst      |      Owner:  catalyst
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.1.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  util
Actual Points:                |  Parent ID:  #19531
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 It can be useful to have macros that give the lengths of byte strings
 encoded with baseXX, particularly for declaring fixed-size buffers. Some
 use cases will need to include a terminating NUL, others not. These macros
 won't check for overflow, so nothing should pass untrusted inputs to them.

 I propose macros named like `BASE64_LEN()` for the raw length and like
 `BASE64_SIZE()` for the length with NUL.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21872>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list