diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-04-19 12:37:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-04-19 12:37:18 -0400 |
commit | 9eeb902d1215afb54f26c91a5e6e372b9b2553f2 (patch) | |
tree | 2d520a9a9699b94ba3c70f9efabaf65f51d2288c /src/or/routerparse.c | |
parent | f52cfbfc0091dd759b51e6d236a4e4fbea22ba26 (diff) | |
parent | 177cadff8d4ca01aad21abea44c7ecc0731525d6 (diff) | |
download | tor-9eeb902d1215afb54f26c91a5e6e372b9b2553f2.tar.gz tor-9eeb902d1215afb54f26c91a5e6e372b9b2553f2.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 052a52e614..91e897ab1d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -4638,12 +4638,12 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out, else eos = eos + 1; /* Check length. */ - if (strlen(desc) > REND_DESC_MAX_SIZE) { + if (eos-desc > REND_DESC_MAX_SIZE) { /* XXX023 If we are parsing this descriptor as a server, this * should be a protocol warning. */ log_warn(LD_REND, "Descriptor length is %i which exceeds " "maximum rendezvous descriptor size of %i bytes.", - (int)strlen(desc), REND_DESC_MAX_SIZE); + (int)(eos-desc), REND_DESC_MAX_SIZE); goto err; } /* Tokenize descriptor. */ |