]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Update aes.c (#336)
authorIceman <iceman@iuse.se>
Sun, 25 Jun 2017 22:52:09 +0000 (00:52 +0200)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Sun, 25 Jun 2017 22:52:09 +0000 (00:52 +0200)
FIX:  coverity scan - improper use of sizeof

armsrc/aes.c

index a199d04b7dc8d48bacbf446de619406385320159..0a3f893d636b07ead4d35b55843aed2613a1fbe9 100644 (file)
@@ -1152,7 +1152,7 @@ int main()
     if( AesCtxIni(&ctx, iv, key, KEY128, CBC) < 0)
         printf("init error\n");
 
     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
         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( 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;
 }
         printf("error in decryption\n");
 
     printf("%s\n", databuf);
 
     return 0;
 }
-#endif
\ No newline at end of file
+#endif
Impressum, Datenschutz