* https://www.openssl.org/source/license.html
*/
-#include <openssl/crypto.h>
-#include "modes_lcl.h"
#include <string.h>
+#include <openssl/crypto.h>
+#include "crypto/modes.h"
+
+#if defined(__GNUC__) && !defined(STRICT_ALIGNMENT)
+typedef size_t size_t_aX __attribute((__aligned__(1)));
+#else
+typedef size_t size_t_aX;
+#endif
/*
* The input and output encrypted as though 128bit ofb mode is being used.
while (len >= 16) {
(*block) (ivec, ivec, key);
for (; n < 16; n += sizeof(size_t))
- *(size_t *)(out + n) =
- *(size_t *)(in + n) ^ *(size_t *)(ivec + n);
+ *(size_t_aX *)(out + n) =
+ *(size_t_aX *)(in + n)
+ ^ *(size_t_aX *)(ivec + n);
len -= 16;
out += 16;
in += 16;