diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-16 05:22:38 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-16 05:30:10 +0200 |
commit | 7305c533516df296124d6b2415482d2febb7328a (patch) | |
tree | 538a6fde082c7d421456b663fb343a9efc86a69d /src/fastd.h | |
parent | 094ecaf3b7de251494c313df692e056451a9ba19 (diff) | |
download | fastd-7305c533516df296124d6b2415482d2febb7328a.tar fastd-7305c533516df296124d6b2415482d2febb7328a.zip |
Fix alignment for NaCl's core2 assembler implementation of AES128-CTR
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fastd.h b/src/fastd.h index d7946ea..023576b 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -289,7 +289,8 @@ static inline size_t alignto(size_t l, size_t a) { static inline fastd_buffer fastd_buffer_alloc(size_t len, size_t head_space, size_t tail_space) { size_t base_len = head_space+len+tail_space; - uint8_t *ptr = malloc(base_len); + void *ptr; + posix_memalign(&ptr, 16, base_len); return (fastd_buffer){ .base = ptr, .base_len = base_len, .data = ptr+head_space, .len = len }; } |