Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#1731 closed defect (fixed)

tor misparses libevent 1.4.14b-stable on bsd

Reported by: arma Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

<Tas> hm, Tor v0.2.2.14-alpha has a wrong message on startup: "Jul 26 03:43:56.451 [warn] Libevent version 1.4.14b-stable often crashes when running a Tor server with BSD variants. Please use the latest version of libevent (1.3b or later)"
<Tas> 1.4.x is newer than 1.3.x
<Tas> and it doesn't crash either :-)

In tor_decode_libevent_version() it says:

/* Try the new preferred "1.4.11-stable" format. */
fields = sscanf(v, "%u.%u.%u%c", &major, &minor, &patchlevel, &c);

if (fields == 3
(fields == 4 && (c == '-'
c == '_'))) {

return V(major,minor,patchlevel);

}

Perhaps the problem is that Tor doesn't know how to handle both a letter and a dash?

I don't know what strings are valid libevent versions, so this is best as Nick's bug.

Child Tickets

Change History (5)

comment:1 Changed 9 years ago by Sebastian

I have a proposed fix in bug1731 in my repo. It works for tas and I tried it on a few different libevent versions, which it doesn't seem to break.

comment:2 Changed 9 years ago by Tas

(adding a comment to see if that makes trac send notification emails to me)

comment:3 Changed 9 years ago by nickm

Looks good. It needs a changes file, and it should be against maint-0.2.1.

comment:4 Changed 9 years ago by nickm

Resolution: fixed
Status: newclosed

Merged your revised patch. Thanks!

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.