summaryrefslogtreecommitdiff
path: root/crypto/cipher.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-06-28 14:07:57 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-06-28 14:07:57 +0200
commit4ac44d603f290242cbba2e0d0383460412d55c04 (patch)
treea573d3a85920efb639707e6e528e0cac59666199 /crypto/cipher.c
parentaeb235fbdded8149156360a2b2f9ca2c6d99448e (diff)
parentc5c0586a6771a33a5da7985495c1beab72d292b1 (diff)
downloadlinux-crypto-4ac44d603f290242cbba2e0d0383460412d55c04.tar.gz
linux-crypto-4ac44d603f290242cbba2e0d0383460412d55c04.zip
Merge tag 'v4.18-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 4.18-rc2
Diffstat (limited to 'crypto/cipher.c')
-rw-r--r--crypto/cipher.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 94fa3551..57836c30 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -13,6 +13,7 @@
*
*/
+#include <crypto/algapi.h>
#include <linux/kernel.h>
#include <linux/crypto.h>
#include <linux/errno.h>
@@ -67,7 +68,7 @@ static void cipher_crypt_unaligned(void (*fn)(struct crypto_tfm *, u8 *,
{
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
unsigned int size = crypto_tfm_alg_blocksize(tfm);
- u8 buffer[size + alignmask];
+ u8 buffer[MAX_CIPHER_BLOCKSIZE + MAX_CIPHER_ALIGNMASK];
u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
memcpy(tmp, src, size);