From cc334eff3eb2a37efcda3728607b29f1e1210bb2 Mon Sep 17 00:00:00 2001 From: wslfa Date: Sun, 28 Dec 2014 00:55:41 +0800 Subject: [PATCH] aescrypt2.c local char array not initial I change the main() function to a normal function, use many threads call it. so, in concurrent situation, these initial operation is necessary. --- programs/aes/aescrypt2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c index 55f925180..63ea51c61 100644 --- a/programs/aes/aescrypt2.c +++ b/programs/aes/aescrypt2.c @@ -116,6 +116,10 @@ int main( int argc, char *argv[] ) } mode = atoi( argv[1] ); + memset(IV, 0, sizeof(IV)); + memset(key, 0, sizeof(key)); + memset(digest, 0, sizeof(digest)); + memset(buffer, 0, sizeof(buffer)); if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) {