aesni: Align all class instances to 16 byte boundaries

While the required members are aligned in the struct as required, on 32-bit
platforms the allocator aligns the structures itself to 8 bytes only. This
results in non-aligned struct members, and invalid memory accesses.
This commit is contained in:
Martin Willi
2015-04-15 13:44:40 +02:00
parent 0c83225883
commit 93f0080265
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -623,7 +623,7 @@ METHOD(crypter_t, destroy, void,
private_aesni_ctr_t *this)
{
DESTROY_IF(this->key);
free(this);
free_align(this);
}
/**
@@ -650,7 +650,7 @@ aesni_ctr_t *aesni_ctr_create(encryption_algorithm_t algo, size_t key_size)
return NULL;
}
INIT(this,
INIT_ALIGN(this, sizeof(__m128i),
.public = {
.crypter = {
.encrypt = _crypt,