diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:33:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:33:07 -0400 |
commit | 069946852a5f847e92062cd1b2a56c20935592b2 (patch) | |
tree | 76893e101434491a0991ed41483fc9d0ed4f46d6 /src/feature/rend | |
parent | 3eb9331133a0606e86114bb613f03c674050932d (diff) | |
parent | 7d80bf80fe9017e04fff4b588f49d0393332ebee (diff) | |
download | tor-069946852a5f847e92062cd1b2a56c20935592b2.tar.gz tor-069946852a5f847e92062cd1b2a56c20935592b2.zip |
Merge branch 'maint-0.4.4'
Diffstat (limited to 'src/feature/rend')
-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 e171562d17..8d3ed1ad03 100644 --- a/src/feature/rend/rendclient.c +++ b/src/feature/rend/rendclient.c @@ -268,8 +268,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; |