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
@@ -693,7 +693,7 @@ METHOD(crypter_t, destroy, void,
{
DESTROY_IF(this->ekey);
DESTROY_IF(this->dkey);
free(this);
free_align(this);
}
/**
@@ -720,7 +720,7 @@ aesni_cbc_t *aesni_cbc_create(encryption_algorithm_t algo, size_t key_size)
return NULL;
}
INIT(this,
INIT_ALIGN(this, sizeof(__m128i),
.public = {
.crypter = {
.encrypt = _encrypt,