aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils.c2
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];
}