Initialize variables in constructor

This commit is contained in:
Jan Klass 2017-03-21 18:26:46 +01:00
parent e7e6197028
commit 5cd4b094a4
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,9 @@ CryptState::CryptState() {
for (int i=0;i<0x100;i++)
decrypt_history[i] = 0;
bInit = false;
memset(raw_key, 0, AES_KEY_SIZE_BYTES);
memset(encrypt_iv, 0, AES_BLOCK_SIZE);
memset(decrypt_iv, 0, AES_BLOCK_SIZE);
uiGood=uiLate=uiLost=uiResync=0;
uiRemoteGood=uiRemoteLate=uiRemoteLost=uiRemoteResync=0;
}

View File

@ -70,6 +70,7 @@ Global::Global() {
db = 0;
p = 0;
nam = 0;
c = 0;
uiSession = 0;
uiDoublePush = 1000000;
iPushToTalk = 0;