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.
This commit is contained in:
wslfa 2014-12-28 00:55:41 +08:00 committed by Paul Bakker
parent 9d7fc16dbf
commit cc334eff3e

View file

@ -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 )
{