more safe
This commit is contained in:
@@ -190,8 +190,8 @@ GroupTextMessage decodeGroupMessage(FrameStruct frame) {
|
||||
|
||||
size_t plaintextLen = 0;
|
||||
|
||||
mac_then_decrypt(aes_key, frame.payload + index, frame.payloadLen - index, tmp, &plaintextLen);
|
||||
if (plaintextLen == 0) {
|
||||
unsigned char res = mac_then_decrypt(aes_key, frame.payload + index, frame.payloadLen - index, tmp, &plaintextLen);
|
||||
if (plaintextLen == 0 || res != 0) {
|
||||
printf("error decrypting");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user