diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-18 14:32:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-18 14:32:18 -0400 |
commit | 15127476561a18a7074d8022f7b80ddfabbdc29b (patch) | |
tree | 1ca9b2b2b669d997c23fe690d0b2da501a896e43 | |
parent | a770e1cc22e416b84dcc4e8c81fcec5483d2d00c (diff) | |
parent | 173efa10515e23b45e37f96a3755a2f16411a71a (diff) | |
download | tor-15127476561a18a7074d8022f7b80ddfabbdc29b.tar.gz tor-15127476561a18a7074d8022f7b80ddfabbdc29b.zip |
Merge remote-tracking branch 'origin/maint-0.2.4'
-rw-r--r-- | changes/bug8059 | 6 | ||||
-rw-r--r-- | src/or/channeltls.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changes/bug8059 b/changes/bug8059 new file mode 100644 index 0000000000..47273ed0ac --- /dev/null +++ b/changes/bug8059 @@ -0,0 +1,6 @@ + o Minor bugfixes (protocol conformance): + - Fix a misframing issue when reading the version numbers in a + VERSIONS cell. Previously we would recognize [00 01 00 02] as + 'version 1, version 2, and version 0x100', when it should have + only included versions 1 and 2. Fixes bug 8059; bugfix on + 0.2.0.10-alpha. Reported pseudonymously. diff --git a/src/or/channeltls.c b/src/or/channeltls.c index 1035a14127..60693daeb2 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -1208,7 +1208,7 @@ channel_tls_process_versions_cell(var_cell_t *cell, channel_tls_t *chan) tor_assert(chan->conn->handshake_state); end = cell->payload + cell->payload_len; - for (cp = cell->payload; cp+1 < end; ++cp) { + for (cp = cell->payload; cp+1 < end; cp += 2) { uint16_t v = ntohs(get_uint16(cp)); if (is_or_protocol_version_known(v) && v > highest_supported_version) highest_supported_version = v; |