From d8e61a30047ab910c64d62c5882a97c2fcb53c94 Mon Sep 17 00:00:00 2001 From: Iceman Date: Mon, 26 Jun 2017 00:52:09 +0200 Subject: [PATCH 1/1] Update aes.c (#336) FIX: coverity scan - improper use of sizeof --- armsrc/aes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/armsrc/aes.c b/armsrc/aes.c index a199d04b..0a3f893d 100644 --- a/armsrc/aes.c +++ b/armsrc/aes.c @@ -1152,7 +1152,7 @@ int main() if( AesCtxIni(&ctx, iv, key, KEY128, CBC) < 0) printf("init error\n"); - if (AesEncrypt(&ctx, databuf, databuf, sizeof databuf) < 0) + if (AesEncrypt(&ctx, databuf, databuf, sizeof(databuf) ) < 0) printf("error in encryption\n"); // initialize context and decrypt cipher at other end @@ -1160,11 +1160,11 @@ int main() if( AesCtxIni(&ctx, iv, key, KEY128, CBC) < 0) printf("init error\n"); - if (AesDecrypt(&ctx, databuf, databuf, sizeof databuf) < 0) + if (AesDecrypt(&ctx, databuf, databuf, sizeof(databuf) ) < 0) printf("error in decryption\n"); printf("%s\n", databuf); return 0; } -#endif \ No newline at end of file +#endif -- 2.39.2