From 28e18e35f861d2f646df0001ec1f81fe14da7532 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Mon, 1 Jan 2018 11:54:43 +0900 Subject: [PATCH] mdk5 error --- wolfcrypt/src/camellia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/camellia.c b/wolfcrypt/src/camellia.c index cff40a80b..b3929bcc2 100644 --- a/wolfcrypt/src/camellia.c +++ b/wolfcrypt/src/camellia.c @@ -1598,10 +1598,11 @@ int wc_CamelliaDecryptDirect(Camellia* cam, byte* out, const byte* in) int wc_CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz) { + word32 blocks; if (cam == NULL || out == NULL || in == NULL) { return BAD_FUNC_ARG; } - word32 blocks = sz / CAMELLIA_BLOCK_SIZE; + blocks = sz / CAMELLIA_BLOCK_SIZE; while (blocks--) { xorbuf((byte*)cam->reg, in, CAMELLIA_BLOCK_SIZE); @@ -1619,10 +1620,11 @@ int wc_CamelliaCbcEncrypt(Camellia* cam, byte* out, const byte* in, word32 sz) int wc_CamelliaCbcDecrypt(Camellia* cam, byte* out, const byte* in, word32 sz) { + word32 blocks; if (cam == NULL || out == NULL || in == NULL) { return BAD_FUNC_ARG; } - word32 blocks = sz / CAMELLIA_BLOCK_SIZE; + blocks = sz / CAMELLIA_BLOCK_SIZE; while (blocks--) { XMEMCPY(cam->tmp, in, CAMELLIA_BLOCK_SIZE);