ARM64 build fixes

This commit is contained in:
Adam Ierymenko 2020-03-16 09:27:56 -07:00
parent 37d4e83fad
commit 1d314858ef
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
2 changed files with 2 additions and 2 deletions

View file

@ -153,7 +153,7 @@ int CertificateOfMembership::unmarshal(const uint8_t *data,int len) noexcept
if (_signatureLength == 0)
return -1;
}
if ((p + _signatureLength) > len)
if ((int)(p + _signatureLength) > len)
return -1;
memcpy(_signature,data + p,96);
p += 96;

View file

@ -1016,7 +1016,7 @@ static ZT_INLINE void salsa2012DeriveKey(const uint8_t *const in,uint8_t *const
// key space into two halves-- A->B and B->A (since order will change).
#ifdef ZT_NO_UNALIGNED_ACCESS
for(int i=0;i<18;++i)
out[i] = in[i] ^ packet.b[i];
out[i] = in[i] ^ packet.unsafeData[i];
#else
*reinterpret_cast<uint64_t *>(out) = *reinterpret_cast<const uint64_t *>(in) ^ *reinterpret_cast<const uint64_t *>(packet.unsafeData);
*reinterpret_cast<uint64_t *>(out + 8) = *reinterpret_cast<const uint64_t *>(in + 8) ^ *reinterpret_cast<const uint64_t *>(packet.unsafeData + 8);