summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Godziuk <andrzej@godziuk.pl>2017-05-04 12:17:49 +0200
committerAndrzej Godziuk <andrzej@godziuk.pl>2017-05-04 12:17:49 +0200
commitc1a04ae71aa9dd7a590035326d5dabac31645fca (patch)
treed565dfc72b10b0f10e672e8bc40e9a72c3912b8e
parent3acdcaaa65badbf3feb7d5438fdf1f66e1faa955 (diff)
Close Issue #42
-rw-r--r--main.c2
-rw-r--r--util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 61b30c7..3dfc98f 100644
--- a/main.c
+++ b/main.c
@@ -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;
diff --git a/util.c b/util.c
index a2f60de..b1353b3 100644
--- a/util.c
+++ b/util.c
@@ -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 */