aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2018-09-11 00:41:32 +0000
committercypherpunks <cypherpunks@torproject.org>2018-09-12 14:03:06 +0000
commitab91302fd04d3ee03a2855c1ffb8570923f8d40c (patch)
treed5eacd70fb533c36615b37827c5b688f21d04688 /src/feature/nodelist
parent19dbc385d540df70b5e9a6193248080a298577c3 (diff)
downloadtor-ab91302fd04d3ee03a2855c1ffb8570923f8d40c.tar.gz
tor-ab91302fd04d3ee03a2855c1ffb8570923f8d40c.zip
nodelist: use strcmpstart() instead of strncmp()
in rend_parse_v2_service_descriptor. Fix on c58675ca728f12b42f65e5b8964ae695c2e0ec2d
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/routerparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/feature/nodelist/routerparse.c b/src/feature/nodelist/routerparse.c
index 73d320de40..b76b2974fa 100644
--- a/src/feature/nodelist/routerparse.c
+++ b/src/feature/nodelist/routerparse.c
@@ -5167,8 +5167,7 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out,
tor_assert(desc);
/* Check if desc starts correctly. */
- if (strncmp(desc, "rendezvous-service-descriptor ",
- strlen("rendezvous-service-descriptor "))) {
+ if (strcmpstart(desc, "rendezvous-service-descriptor ")) {
log_info(LD_REND, "Descriptor does not start correctly.");
goto err;
}