diff options
author | Martin Willi <martin@strongswan.org> | 2009-11-10 14:12:00 +0100 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-11-12 13:37:06 +0000 |
commit | 098466039fff91bbff9ff28f463087188e5605b6 (patch) | |
tree | 2d9d520b72df6b3a0f08f8532824015c7b97bcce /src | |
parent | addfeeff9c87acfbe12538b61affeeab1d9fa840 (diff) | |
download | strongswan-098466039fff91bbff9ff28f463087188e5605b6.tar.bz2 strongswan-098466039fff91bbff9ff28f463087188e5605b6.tar.xz |
Fix word alignement in memxor() on 64-bit architectures
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/utils.c b/src/libstrongswan/utils.c index 57b55c11c..a3cb87056 100644 --- a/src/libstrongswan/utils.c +++ b/src/libstrongswan/utils.c @@ -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]; } |