[tor-bugs] #25127 [Core Tor/Tor]: Rust implementation of protover_get_supported_protocols() leaks memory

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 2 20:36:30 UTC 2018


#25127: Rust implementation of protover_get_supported_protocols() leaks memory
------------------------------+----------------------------------
     Reporter:  nickm         |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.3.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  rust, protover, leak
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+----------------------------------
 The src/rust/protover/ffi.rs version of protover_get_supported_protocols
 returns a newly allocated char*.  But the C version of it returns a const
 char *, and doesn't allocate.  This difference causes a memory leak when
 the C code uses the rust.

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


More information about the tor-bugs mailing list