]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix last patch
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Nov 2004 06:12:21 +0000 (06:12 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Nov 2004 06:12:21 +0000 (06:12 +0000)
svn:r3031

src/or/connection_edge.c

index 0995afe27ac19a63123deb0dfbe08a3439f15bb3..31bc9ba35108abc5a6256b1cbf37581d7022a765 100644 (file)
@@ -414,13 +414,14 @@ static int connection_ap_handshake_process_socks(connection_t *conn) {
     if (strlen(s+1) == HEX_DIGEST_LEN) {
       conn->chosen_exit_name = tor_malloc(HEX_DIGEST_LEN+2);
       *(conn->chosen_exit_name) = '$';
-      strlcpy(conn->chosen_exit_name+1, HEX_DIGEST_LEN+1, s+1);
+      strlcpy(conn->chosen_exit_name+1, s+1, HEX_DIGEST_LEN+1);
     } else {
       conn->chosen_exit_name = tor_strdup(s+1);
     }
     *s = 0;
     if (!is_legal_nickname_or_hexdigest(conn->chosen_exit_name)) {
-      log_fn(LOG_WARN, "%s is not a legal exit node nickname; rejecting.");
+      log_fn(LOG_WARN, "%s is not a legal exit node nickname; rejecting.",
+             conn->chosen_exit_name);
       return -1;
     }
   }