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:
parent
9d7fc16dbf
commit
cc334eff3e
1 changed files with 4 additions and 0 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue