Set the algorithm member on cipher_t when allocating AES crypto instance. Apply same fix to NULL cipher.

This commit is contained in:
jfigus
2014-04-28 10:06:17 -04:00
committed by Travis Cross
parent aa4261d11f
commit b9da5149e2
2 changed files with 12 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ null_cipher_alloc(cipher_t **c, int key_len) {
/* set pointers */
*c = (cipher_t *)pointer;
(*c)->algorithm = NULL_CIPHER;
(*c)->type = &null_cipher;
(*c)->state = pointer + sizeof(cipher_t);