summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-04-26 18:23:42 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-04-26 18:24:30 +0300
commitb929a9a11f329649e578aa86ca403637e5470894 (patch)
tree235f6e6e744020a7232199625dbf49c543047792 /protocols
parent627d6b0d0332b53def013cee3ad114d1ef896537 (diff)
protocols: jabber: omemo:
- fixed memory leak on message decryption
Diffstat (limited to 'protocols')
-rwxr-xr-xprotocols/JabberG/src/jabber_omemo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp
index 427ac3ff1b..427bae4bb2 100755
--- a/protocols/JabberG/src/jabber_omemo.cpp
+++ b/protocols/JabberG/src/jabber_omemo.cpp
@@ -1783,7 +1783,6 @@ bool CJabberProto::OmemoHandleMessage(HXML node, wchar_t *jid, time_t msgTime)
default:
debugLogA("Jabber OMEMO: error: session_cipher_decrypt_signal_message failed with unknown error");
break;
-
}
}
}
@@ -1811,6 +1810,7 @@ bool CJabberProto::OmemoHandleMessage(HXML node, wchar_t *jid, time_t msgTime)
tag = (unsigned char*)mir_alloc(tag_len);
memcpy(tag, ptr, tag_len);
mir_free(tmp);
+ signal_buffer_free(decrypted_key);
}
out = (char*)mir_alloc(payload_len + 1); //TODO: check this
const EVP_CIPHER *cipher = EVP_aes_128_gcm();
@@ -1839,7 +1839,6 @@ bool CJabberProto::OmemoHandleMessage(HXML node, wchar_t *jid, time_t msgTime)
debugLogA("Jabber OMEMO: error: aes_128_gcm verification failed");
return true;
}
-
}
time_t now = time(nullptr);