[tor-bugs] #22789 [Core Tor/Tor]: Tor 0.3.1.4-alpha crash on OpenBSD-current

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jul 3 10:44:54 UTC 2017


#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


More information about the tor-bugs mailing list