diff options
author | Andrzej Godziuk <andrzej@godziuk.pl> | 2017-05-04 12:17:49 +0200 |
---|---|---|
committer | Andrzej Godziuk <andrzej@godziuk.pl> | 2017-05-04 12:17:49 +0200 |
commit | c1a04ae71aa9dd7a590035326d5dabac31645fca (patch) | |
tree | d565dfc72b10b0f10e672e8bc40e9a72c3912b8e | |
parent | 3acdcaaa65badbf3feb7d5438fdf1f66e1faa955 (diff) |
Close Issue #42
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | util.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -662,7 +662,7 @@ int send_tunnel_request_packet(char *remote_host, int remote_port, int friend_nu | |||
662 | log_printf(L_ERROR, "Could not allocate memory for tunnel request packet\n"); | 662 | log_printf(L_ERROR, "Could not allocate memory for tunnel request packet\n"); |
663 | exit(1); | 663 | exit(1); |
664 | } | 664 | } |
665 | strcpy((char *)data+PROTOCOL_BUFFER_OFFSET, remote_host); | 665 | memcpy((char *)data+PROTOCOL_BUFFER_OFFSET, remote_host, strlen(remote_host)); |
666 | 666 | ||
667 | frame->friendnumber = friend_number; | 667 | frame->friendnumber = friend_number; |
668 | frame->packet_type = PACKET_TYPE_REQUESTTUNNEL; | 668 | frame->packet_type = PACKET_TYPE_REQUESTTUNNEL; |
@@ -38,7 +38,7 @@ void to_hex(char_t *a, const char_t *p, int size) | |||
38 | *a++ = c - 10 + 'A'; | 38 | *a++ = c - 10 + 'A'; |
39 | } | 39 | } |
40 | } | 40 | } |
41 | a = '\0'; | 41 | *a = '\0'; |
42 | } | 42 | } |
43 | 43 | ||
44 | /* From utox/util.c */ | 44 | /* From utox/util.c */ |