Browse Source

ARM64 build fixes

Adam Ierymenko 5 years ago
parent
commit
1d314858ef
2 changed files with 2 additions and 2 deletions
  1. 1 1
      node/CertificateOfMembership.cpp
  2. 1 1
      node/Protocol.hpp

+ 1 - 1
node/CertificateOfMembership.cpp

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

+ 1 - 1
node/Protocol.hpp

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