Fix word alignement in memxor() on 64-bit architectures

This commit is contained in:
Martin Willi
2009-11-12 13:37:06 +00:00
parent addfeeff9c
commit 098466039f
+1 -1
View File
@@ -64,7 +64,7 @@ void memxor(u_int8_t dst[], u_int8_t src[], size_t n)
int m, i;
/* byte wise XOR until dst aligned */
for (i = 0; (uintptr_t)&dst[i] % sizeof(long); i++)
for (i = 0; (uintptr_t)&dst[i] % sizeof(long) && i < n; i++)
{
dst[i] ^= src[i];
}