diff options
author | xor2003 <xorrezerv2@list.ru> | 2014-10-24 15:57:10 +0400 |
---|---|---|
committer | xor2003 <xorrezerv2@list.ru> | 2014-10-24 15:57:10 +0400 |
commit | 6b0fe7eb41ad7c59c976d9715dc9f8e95938a410 (patch) | |
tree | b079c85cf7d35869b8bfdaff8c3fc2ff971ccef7 /toxcore | |
parent | 837f72b39e7c1b40120ce6b5f51c93fe33ccd771 (diff) |
Fix uninitialized
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/group.c | 2 | ||||
-rw-r--r-- | toxcore/net_crypto.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/toxcore/group.c b/toxcore/group.c index 3a3a0561..ffa36326 100644 --- a/toxcore/group.c +++ b/toxcore/group.c | |||
@@ -190,7 +190,7 @@ static int get_peer_index(Group_c *g, uint16_t peer_number) | |||
190 | 190 | ||
191 | static uint16_t calculate_comp_value(const uint8_t *pk1, const uint8_t *pk2) | 191 | static uint16_t calculate_comp_value(const uint8_t *pk1, const uint8_t *pk2) |
192 | { | 192 | { |
193 | uint8_t cmp1, cmp2; | 193 | uint8_t cmp1, cmp2=0; |
194 | 194 | ||
195 | for (cmp1 = crypto_box_PUBLICKEYBYTES; cmp1 != 0; --cmp1) { | 195 | for (cmp1 = crypto_box_PUBLICKEYBYTES; cmp1 != 0; --cmp1) { |
196 | uint8_t index = crypto_box_PUBLICKEYBYTES - cmp1; | 196 | uint8_t index = crypto_box_PUBLICKEYBYTES - cmp1; |
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 63012ce6..cfc7d366 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -1817,6 +1817,7 @@ static int tcp_oob_callback(void *object, const uint8_t *public_key, const uint8 | |||
1817 | 1817 | ||
1818 | if (crypt_connection_id == -1) { | 1818 | if (crypt_connection_id == -1) { |
1819 | IP_Port source; | 1819 | IP_Port source; |
1820 | source.port = 0; | ||
1820 | source.ip.family = TCP_FAMILY; | 1821 | source.ip.family = TCP_FAMILY; |
1821 | source.ip.ip6.uint32[0] = location; | 1822 | source.ip.ip6.uint32[0] = location; |
1822 | 1823 | ||