[tor-bugs] #30458 [Core Tor/Tor]: CID 1444999 dead trunnel-generated code

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 9 20:03:30 UTC 2019


#30458: CID 1444999 dead trunnel-generated code
------------------------------+-------------------------------
     Reporter:  catalyst      |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  coverity, trunnel
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-------------------------------
 This one looks valid to me, but also looks like it will need a trunnel
 change to the code generation for handling unions.

 {{{
 *** CID 1444999:  Control flow issues  (DEADCODE)
 /src/trunnel/sendme.c: 244 in sendme_cell_encode()
 238             break;
 239         }
 240         /* Write the length field back to data_len */
 241         trunnel_assert(written >= written_before_union);
 242     #if UINT16_MAX < SIZE_MAX
 243         if (written - written_before_union > UINT16_MAX)
 >>>     CID 1444999:  Control flow issues  (DEADCODE)
 >>>     Execution cannot reach this statement: "goto check_failed;".
 244           goto check_failed;
 245     #endif
 246         trunnel_set_uint16(backptr_data_len, trunnel_htons(written -
 written_before_union));
 247       }
 248
 249
 }}}

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


More information about the tor-bugs mailing list