- 17 Sep, 2019 1 commit
-
-
Nick Mathewson authored
We previously used tor_fragile_assert() to declare that this case could not happen: VERSIONS cells are always supposed to be variable-sized, right? This is incorrect, though. On a v1 link protocol connection, all cells are fixed-sized. There aren't supposed to be any VERSIONS cells with this version of the protocol, but apparently, somebody was messing up. (The v1 link protocol is obsolete, so probably the implementer responsible didn't mean to be using it.) Fixes bug 31107. Bugfix on 0.2.4.4-alpha, when we introduced a tor_fragile_assert() for this case.
-
- 08 Aug, 2019 1 commit
-
-
Nick Mathewson authored
My previous fix removed a comparison, which would have caused us to warn about every skew instead of skews of over an hour.
-
- 06 Aug, 2019 1 commit
-
-
Nick Mathewson authored
On some windows builds, time_t is 64 bits but long is not. This is causing appveyor builds to fail. Also, one of our uses of labs() on time_t was logically incorrect: it was telling us to accept NETINFO cells up to three minutes _before_ the message they were responding to, which doesn't make sense. This patch adds a time_abs() function that we should eventually move to intmath.h or something. For now, though, it will make merges easier to have it file-local in channeltls.c. Fixes bug 31343; bugfix on 0.2.4.4-alpha.
-
- 16 Feb, 2018 1 commit
-
-
This commit takes a piece of commit af8cadf3 and a piece of commit 46fe353f25, with the goal of making channel_is_client() be based on what sort of connection handshake the other side used, rather than seeing whether the other side ever sent a create_fast cell to us.
-
- 31 Jan, 2018 1 commit
-
-
The accurate address of a connection is real_addr, not the addr member. channel_tls_get_remote_addr_method() now returns real_addr instead. Fixes #24952; bugfix on 707c1e2e in 0.2.4.11-alpha. Signed-off-by:
Fernando Fernandez Mancera <ffmancera@riseup.net>
-
- 18 Oct, 2016 1 commit
-
-
Nick Mathewson authored
-
- 06 Sep, 2016 1 commit
-
-
Nick Mathewson authored
The functions it warns about are: assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc, strdup, strndup, calloc. Also, fix a few lingering instances of these in the code. Use other conventions to indicate _intended_ use of assert and malloc/realloc/etc.
-
- 02 Aug, 2016 1 commit
-
-
Nick Mathewson authored
Remove or adjust as appropriate.
-
- 28 Jul, 2016 1 commit
-
-
Nick Mathewson authored
This is a partial fix for 18902.
-
- 11 Jun, 2016 4 commits
-
-
Nick Mathewson authored
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
-
Nick Mathewson authored
-
Nick Mathewson authored
This warning triggers on silently promoting a float to a double. In our code, it's just a sign that somebody used a float by mistake, since we always prefer double.
-
Nick Mathewson authored
This warning, IIUC, means that the compiler doesn't like it when it sees a NULL check _after_ we've already dereferenced the variable. In such cases, it considers itself free to eliminate the NULL check. There are a couple of tricky cases: One was the case related to the fact that tor_addr_to_in6() can return NULL if it gets a non-AF_INET6 address. The fix was to create a variant which asserts on the address type, and never returns NULL.
-
- 28 Mar, 2016 1 commit
-
-
Nick Mathewson authored
Patch from icanhasaccount; closes 18462.
-
- 21 Mar, 2016 1 commit
-
-
- 27 Feb, 2016 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- 10 Feb, 2016 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
They are no longer "all" digests, but only the "common" digests. Part of 17795. This is an automated patch I made with a couple of perl one-liners: perl -i -pe 's/crypto_digest_all/crypto_common_digests/g;' src/*/*.[ch] perl -i -pe 's/\bdigests_t\b/common_digests_t/g;' src/*/*.[ch]
-
- 11 Dec, 2015 1 commit
-
-
- 01 Jun, 2015 1 commit
-
-
Andrea Shepard authored
-
- 28 May, 2015 3 commits
-
-
Nick Mathewson authored
Unit tests still pass.
-
Nick Mathewson authored
-
Nick Mathewson authored
An earlier version of these tests was broken; now they're a nicer, more robust, more black-box set of tests. The key is to have each test check a handshake message that is wrong in _one_ way.
-
- 10 Mar, 2015 1 commit
-
-
Nick Mathewson authored
Closes ticket 15212
-
- 24 Feb, 2015 1 commit
-
-
Nick Mathewson authored
-
- 02 Jan, 2015 1 commit
-
-
Nick Mathewson authored
-
- 21 Dec, 2014 2 commits
-
-
- 28 Nov, 2014 1 commit
-
-
Nick Mathewson authored
-
- 30 Oct, 2014 1 commit
-
-
teor authored
Silence clang warnings under --enable-expensive-hardening, including: + implicit truncation of 64 bit values to 32 bit; + const char assignment to self; + tautological compare; and + additional parentheses around equality tests. (gcc uses these to silence assignment, so clang warns when they're present in an equality test. But we need to use extra parentheses in macros to isolate them from other code).
-
- 28 Oct, 2014 1 commit
-
-
Nick Mathewson authored
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
-
- 01 Oct, 2014 4 commits
-
-
Andrea Shepard authored
-
Andrea Shepard authored
-
Andrea Shepard authored
-
Andrea Shepard authored
Implement scheduler mechanism to track lists of channels wanting cells or writes; doesn't actually drive the cell flow from it yet
-
- 05 Sep, 2014 1 commit
-
-
Andrea Shepard authored
Correctly update channel local mark when address of incoming connection changes after handshake; fixes bug #12160
-
- 11 Jun, 2014 1 commit
-
-
Nick Mathewson authored
Instead of killing an or_connection_t that has had no circuits for the last 3 minutes, give every or_connection_t a randomized timeout, so that an observer can't so easily infer from the connection close time the time at which its last circuit closed. Also, increase the base timeout for canonical connections from 3 minutes to 15 minutes. Fix for ticket 6799.
-
- 08 Apr, 2014 1 commit
-
-
Nick Mathewson authored
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.
-
- 08 Feb, 2014 1 commit
-
-
Andrea Shepard authored
-