WireGuard/wireguard-nt

Question About Impl of CopyAndAssignCidr

ffproxy opened this issue · 0 comments

Hello,

I did not understand about the whole allocdips.c implementation , But the line below seems a bug .

Especially on line allowedips.c:39 as below:
#if REG_DWORD == REG_DWORD_LITTLE_ENDIAN
Node->BitAtA ^= (Bits / 8U - 1U) % 8U;
#endif

In my understanding, It should be

#if REG_DWORD == REG_DWORD_LITTLE_ENDIAN
Node->BitAtA &= (Bits / 8U - 1U) % 8U;
#endif

Appreciate, Thanks.