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

Re: [tor-bugs] #26284 [Core Tor/Tor]: Out-of-bounds smartlist access in protover_compute_vote()



#26284: Out-of-bounds smartlist access in protover_compute_vote()
--------------------------+------------------------------------
 Reporter:  rl1987        |          Owner:  rl1987
     Type:  defect        |         Status:  needs_revision
 Priority:  Medium        |      Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor  |        Version:  Tor: unspecified
 Severity:  Normal        |     Resolution:
 Keywords:  fast-fix      |  Actual Points:
Parent ID:  #26196        |         Points:
 Reviewer:  asn           |        Sponsor:
--------------------------+------------------------------------

Comment (by asn):

 Fixups LGTM.

 Please squash the branch so that it's just one commit.

 Also please consider adding some curly braces in this if clause:
 {{{
 +  if (smartlist_len(list_of_proto_strings) == 0)
 +    return tor_strdup("");
 }}}
 IMO, we should be adding curly braces even in trivial if statements to
 avoid potential Apple `goto fail` issues ;)

 After you do so, feel free to turn it into merge_ready.

 Thanks! :)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26284#comment:7>
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