public void SetRawAddressBytes(NativeArray<byte> bytes, NetworkFamily family = NetworkFamily.Ipv4)
{
CheckRawAddressLength(bytes.Length, family);
var length = math.min(bytes.Length, Length);
UnsafeUtility.MemCpy(RawAddressPtr, bytes.GetUnsafeReadOnlyPtr(), length);
Family = family;
}
The Lenght property looks at family to get the correct size. Thus wrong length may be calculated in the “math.min(bytes.Length, Length);” section.