aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-13 10:08:51 -0400
committerNick Mathewson <nickm@torproject.org>2012-09-13 10:08:51 -0400
commit582f2187a769ea723f6bf13bc91f7a4b3c861408 (patch)
tree91633fb239242a25e8978452e39b39a39b8dfc37 /src/or/routerparse.c
parenta73dec16c539fd957ab09f242cd44b0a0858cd38 (diff)
parent1e68c213a24237b1733cfee3726aa646a805a5a9 (diff)
downloadtor-582f2187a769ea723f6bf13bc91f7a4b3c861408.tar.gz
tor-582f2187a769ea723f6bf13bc91f7a4b3c861408.zip
Merge remote-tracking branch 'origin/maint-0.2.3'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 6b94c6bfdd..22f7d78d88 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -4854,6 +4854,9 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out,
10, 0, INT_MAX, &num_ok, NULL);
if (!num_ok) /* It's a string; let's ignore it. */
continue;
+ if (version >= REND_PROTOCOL_VERSION_BITMASK_WIDTH)
+ /* Avoid undefined left-shift behaviour. */
+ continue;
result->protocols |= 1 << version;
}
SMARTLIST_FOREACH(versions, char *, cp, tor_free(cp));