more safe

This commit is contained in:
2025-09-02 22:11:53 +02:00
parent c5e7dddfd1
commit d133272039

View File

@@ -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");
}