[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21894 [Core Tor/Tor]: Base32_encode: *actually* allow inputs of odd sizes



#21894: Base32_encode: *actually* allow inputs of odd sizes
---------------------------------------+-----------------------------------
 Reporter:  nickm                      |          Owner:  nickm
     Type:  defect                     |         Status:  needs_review
 Priority:  High                       |      Milestone:  Tor:
                                       |  0.3.1.x-final
Component:  Core Tor/Tor               |        Version:
 Severity:  Normal                     |     Resolution:
 Keywords:  029-backport 030-backport  |  Actual Points:  .1
Parent ID:                             |         Points:  .1
 Reviewer:                             |        Sponsor:  SponsorR-can
---------------------------------------+-----------------------------------

Comment (by catalyst):

 How about changing `src[bit/8+1]` in the original to `src[(bit+5)/8]`?
 That is more concise and more symmetric with the original if-expression.
 I think that any time the same byte gets loaded twice into `v`, the low 8
 bits get discarded by the following right-shift.  Then again that might be
 less clear than this patch.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21894#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs