aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-27 06:48:16 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-27 06:48:16 +0000
commit6980929e647b7a73e0634d9f699f18d462b8beca (patch)
tree26b722a9ed0981558ccf0a2c6cc45543ca91ffbf /src/or/rendservice.c
parent44d4516155309e15b3463a543aef6239d485a04e (diff)
downloadtor-6980929e647b7a73e0634d9f699f18d462b8beca.tar.gz
tor-6980929e647b7a73e0634d9f699f18d462b8beca.zip
Use strlcpy, not strcpy.
svn:r2610
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 9ca1f8a390..c5bdd53438 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -459,7 +459,8 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l
memcpy(launched->rend_pk_digest, circuit->rend_pk_digest,
DIGEST_LEN);
memcpy(launched->rend_cookie, r_cookie, REND_COOKIE_LEN);
- strcpy(launched->rend_query, service->service_id);
+ strlcpy(launched->rend_query, service->service_id,
+ sizeof(launched->rend_query));
launched->build_state->pending_final_cpath = cpath =
tor_malloc_zero(sizeof(crypt_path_t));
@@ -539,7 +540,8 @@ rend_service_launch_establish_intro(rend_service_t *service, const char *nicknam
nickname);
return -1;
}
- strcpy(launched->rend_query, service->service_id);
+ strlcpy(launched->rend_query, service->service_id,
+ sizeof(launched->rend_query));
memcpy(launched->rend_pk_digest, service->pk_digest, DIGEST_LEN);
return 0;