[tor-bugs] #31024 [Core Tor/Tor]: Coverity: circpadding: always check circpad_machine_current_state()

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jun 28 15:15:08 UTC 2019


#31024: Coverity: circpadding: always check circpad_machine_current_state()
------------------------------+---------------------------------
     Reporter:  nickm         |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.4.1.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  041-should coverity
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+---------------------------------
 We usually check `circpad_machine_current_state()`'s return value, but in
 2 places we don't.  Coverity thinks that we're messing up in those cases.

 This is CID 1447297 [circpad_estimate_circ_rtt_on_received] and 1447291
 [circpad_is_token_removal_supported].

 I suggest that we change our code to test the pointer in those cases.  If
 we're sure that it can't be NULL, we can is an `if (BUG(...))` check.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31024>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list