Merge pull request #1809 from DanielNovak/fix-decrypt-block-alignment-check

Fix stack buffer overflow in MACThenDecrypt
This commit is contained in:
Liam Cottle authored and GitHub committed 2026-09-28 13:41:02 +13:00
commit b9f519ef5a
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ public:
/**
* \brief checks the MAC (in leading bytes of 'src'), then if valid, decrypts remaining bytes in src.
* \returns zero if MAC is invalid, otherwise the length of decrypted bytes in 'dest'
* \returns zero if MAC is invalid or ciphertext is not block-aligned, otherwise the length of decrypted bytes in 'dest'
*/
static int MACThenDecrypt(const uint8_t* shared_secret, uint8_t* dest, const uint8_t* src, int src_len);