fix memory init issue

and another place where dns data needs to be copied
This commit is contained in:
Grant Limberg 2020-07-31 11:42:03 -07:00
parent 6b197e067a
commit d098a99d09
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
9 changed files with 47 additions and 4 deletions

View file

@ -43,6 +43,7 @@ public:
template<unsigned int C>
static inline void deserializeDNS(const Buffer<C> &b, unsigned int &p, ZT_VirtualNetworkDNS *dns, const unsigned int dnsCount)
{
memset(dns, 0, sizeof(ZT_VirtualNetworkDNS)*ZT_MAX_NETWORK_DNS);
for(unsigned int i = 0; i < dnsCount; ++i) {
char *d = (char*)b.data()+p;
memcpy(dns[i].domain, d, 128);