From bfebc942eaf7098e8d35f1de9159da450d5e3969 Mon Sep 17 00:00:00 2001 From: Robert Ransom Date: Mon, 11 Apr 2011 02:26:07 -0700 Subject: [PATCH 1/2] Correct the warning emitted when rejecting an oversized HS desc --- changes/bug2750 | 6 ++++++ src/or/routerparse.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changes/bug2750 diff --git a/changes/bug2750 b/changes/bug2750 new file mode 100644 index 0000000000..4371a0a4ee --- /dev/null +++ b/changes/bug2750 @@ -0,0 +1,6 @@ + o Minor bugfixes + - Correct the warning displayed when a rendezvous descriptor exceeds + the maximum size. Fixes bug 2750; bugfix on 0.2.1.5-alpha. Found + by John Brooks. + + diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1faa177edf..28ecaf0ad7 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3629,7 +3629,7 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out, /* Check length. */ if (strlen(desc) > REND_DESC_MAX_SIZE) { log_warn(LD_REND, "Descriptor length is %i which exceeds " - "maximum rendezvous descriptor size of %i kilobytes.", + "maximum rendezvous descriptor size of %i bytes.", (int)strlen(desc), REND_DESC_MAX_SIZE); goto err; } From adc31001c2f9923f8fcee2141d233200c95373cf Mon Sep 17 00:00:00 2001 From: Robert Ransom Date: Mon, 18 Apr 2011 13:25:48 -0700 Subject: [PATCH 2/2] Add an XXX --- src/or/routerparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 28ecaf0ad7..3d73f8de68 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3628,6 +3628,8 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out, eos = eos + 1; /* Check length. */ if (strlen(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);