diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:32:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:32:49 -0400 |
commit | 68f8250cbb6f1844e7f16f5f1bc8063b8bbfdf14 (patch) | |
tree | 77f24e28f6a17c00c6779fb9643d73880c9640b6 /src | |
parent | 352991c843e2c0404fd44178cbf3df32cc365bc1 (diff) | |
parent | e873c7e893987f5ad90ef401e6f986c62b4fc42d (diff) | |
download | tor-68f8250cbb6f1844e7f16f5f1bc8063b8bbfdf14.tar.gz tor-68f8250cbb6f1844e7f16f5f1bc8063b8bbfdf14.zip |
Merge branch 'maint-0.3.5' into maint-0.4.2
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/rend/rendclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c index 2e119d7c99..1446dc2269 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; |