diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:33:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-08-10 19:33:06 -0400 |
commit | f3fcc89d055811065bd9fe723b4d71b755b82edc (patch) | |
tree | 4c68a733fcf7f4e6d2c2060e29af1c0a8761a091 /src/feature/rend | |
parent | 39d5e7c76464f4e6dae9762210363de3da7230df (diff) | |
parent | 68f8250cbb6f1844e7f16f5f1bc8063b8bbfdf14 (diff) | |
download | tor-f3fcc89d055811065bd9fe723b4d71b755b82edc.tar.gz tor-f3fcc89d055811065bd9fe723b4d71b755b82edc.zip |
Merge branch 'maint-0.4.2' into maint-0.4.3
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 09db7045fa..d33b61851f 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; |