[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #22789 [Core Tor/Tor]: Tor 0.3.1.4-alpha crash on OpenBSD-current
#22789: Tor 0.3.1.4-alpha crash on OpenBSD-current
----------------------------------------------+----------------------------
Reporter: fredzupy | Owner:
Type: defect | Status: new
Priority: High | Milestone: Tor:
| 0.3.1.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.3.1.4-alpha
Severity: Major | Resolution:
Keywords: tor crash inet_pton ???-backport | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
----------------------------------------------+----------------------------
Comment (by fredzupy):
Replying to [comment:8 cypherpunks]:
> {{{
> long r = strtol(src, &next, 16);
> if (next == NULL || next == src)
> return 0; /* <+strtol> something went wrong */
> }}}
You mean convert the two 'tor_assert()' by 'if' statement? I did that. It
works… At least it doesn't crash the Tor process ! Thanks !
I don't know if it's relevant but on OpenBSD, if the strtol() is too
complicated to manage, there is strtonum() alternative which is meant to
be simpler :
STANDARDS
strtonum() is an OpenBSD extension. The existing alternatives, such
as
atoi(3) and strtol(3), are either impossible or difficult to use
safely.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22789#comment:9>
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