Go to file
Nick Mathewson 092ac26ea2 Fix undefined behavior with pointer addition in channeltls.c
In C, it's a bad idea to do this:

   char *cp = array;
   char *end = array + array_len;

   /* .... */

   if (cp + 3 >= end) { /* out of bounds */ }

because cp+3 might be more than one off the end of the array, and
you are only allowed to construct pointers to the array elements,
and to an element one past the end.  Instead you have to say

   if (cp - array + 3 >= array_len) { /* ... */ }

or something like that.

This patch fixes two of these: one in process_versions_cell
introduced in 0.2.0.10-alpha, and one in process_certs_cell
introduced in 0.2.3.6-alpha.  These are both tracked under bug
10363. "bobnomnom" found and reported both. See also 10313.

In our code, this is likely to be a problem as we used it only if we
get a nasty allocator that makes allocations end close to (void*)-1.
But it's best not to have to worry about such things at all, so
let's just fix all of these we can find.
2014-04-07 22:56:42 -04:00
changes Fix undefined behavior with pointer addition in channeltls.c 2014-04-07 22:56:42 -04:00
contrib Remove some lingering tsocks cruft. 2013-02-27 19:39:57 -05:00
doc Change documentation DirServer->DirAuthority 2013-11-10 12:21:23 -05:00
m4 Use a nicely written autoconf macro to determine the sign of a type 2013-02-07 16:23:48 -05:00
src Fix undefined behavior with pointer addition in channeltls.c 2014-04-07 22:56:42 -04:00
.gitignore Add a new automake dropping ("test-driver") to .gitignore 2013-01-16 01:56:35 -05:00
acinclude.m4 Update the copyright date to 201. 2013-01-16 01:54:56 -05:00
autogen.sh Use a nicely written autoconf macro to determine the sign of a type 2013-02-07 16:23:48 -05:00
ChangeLog rewrite history to improve two changelog entries 2013-10-10 21:17:19 -04:00
configure.ac Better test program for 128-bit math support 2013-04-11 18:08:37 -04:00
Doxyfile.in Fix up all doxygen warnings other than "foo is not documented" 2011-03-16 14:47:27 -04:00
INSTALL Small fixes for the 2702 implementation 2011-04-02 12:15:08 +02:00
LICENSE Update the copyright date to 201. 2013-01-16 01:54:56 -05:00
Makefile.am Use a nicely written autoconf macro to determine the sign of a type 2013-02-07 16:23:48 -05:00
Makefile.nmake Add clean target and test subdir to makefile.nmake 2013-01-16 22:29:38 -05:00
README we have two faqs for now 2010-02-22 00:41:48 -05:00
ReleaseNotes forward-port the 0.2.3.25 changelog and release notes 2012-11-20 03:46:56 -05:00

Tor protects your privacy on the internet by hiding the connection
between your Internet address and the services you use. We believe Tor
is reasonably secure, but please ensure you read the instructions and
configure it properly.

To build Tor from source:
        ./configure && make && make install

Home page:
        https://www.torproject.org/

Download new versions:
        https://www.torproject.org/download.html

Documentation, including links to installation and setup instructions:
        https://www.torproject.org/documentation.html

Making applications work with Tor:
        https://wiki.torproject.org/noreply/TheOnionRouter/TorifyHOWTO

Frequently Asked Questions:
        https://www.torproject.org/faq.html
        https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ