From e873c7e893987f5ad90ef401e6f986c62b4fc42d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 10 Aug 2020 17:36:21 -0400 Subject: small code tweaks to try to work around debian stable complaints --- src/feature/rend/rendclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/feature') diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c index cde954da95..5c9dbea8e3 100644 --- a/src/feature/rend/rendclient.c +++ b/src/feature/rend/rendclient.c @@ -261,8 +261,8 @@ rend_client_send_introduction(origin_circuit_t *introcirc, > MAX_NICKNAME_LEN)) { goto perm_err; } - strncpy(tmp, rendcirc->build_state->chosen_exit->nickname, - (MAX_NICKNAME_LEN+1)); /* nul pads */ + strlcpy(tmp, rendcirc->build_state->chosen_exit->nickname, + sizeof(tmp)); memcpy(tmp+MAX_NICKNAME_LEN+1, rendcirc->rend_data->rend_cookie, REND_COOKIE_LEN); dh_offset = MAX_NICKNAME_LEN+1+REND_COOKIE_LEN; -- cgit v1.2.3-54-g00ecf