[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #29960 [Core Tor/Tor]: Actually check for errors in digest256_to_base64() and callers
#29960: Actually check for errors in digest256_to_base64() and callers
--------------------------------------+------------------------------------
Reporter: teor | Owner: teor
Type: defect | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor | Version: Tor: 0.2.2.6-alpha
Severity: Normal | Resolution:
Keywords: technical-debt, fast-fix | Actual Points: 0.2
Parent ID: | Points: 0.2
Reviewer: nickm | Sponsor: Sponsor31-can
--------------------------------------+------------------------------------
Changes (by nickm):
* status: needs_review => needs_revision
Comment:
a76e833 probably belongs to another branch?
Looking at this code, I think we might be better off changing the API here
so that digest256_to_base64() is documented as "cannot fail", and returns
void. It would simplify all of its callers and their callers in turn, and
more accurately reflect reality.
After all, the only circumstances where it can fail would be if
base64_encode(), when given a 256-bit input, gives a truncated output.
But I believe that's not possible, unless our base64_encode()
implementation is broken.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29960#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