Tor before 0.2.8.9 and 0.2.9.x before 0.2.9.4-alpha had internal functions that were entitled to expect that buf_t data had NUL termination, but the implementation of or/buffers.c did not ensure that NUL termination was present, which allows remote attackers to cause a denial of service (client, hidden service, relay, or authority crash) via crafted data.
https://trac.torproject.org/projects/tor/ticket/20384
https://security.gentoo.org/glsa/201612-45
https://github.com/torproject/tor/commit/3cea86eb2fbb65949673eb4ba8ebb695c87a57ce
https://blog.torproject.org/blog/tor-0289-released-important-fixes
http://www.securityfocus.com/bid/95116