WjCryptLib
WjCryptLib copied to clipboard
Fix stack buffer overflow in AES-CBC test
Hello,
While testing Pull Request https://github.com/WaterJuice/WjCryptLib/pull/7, projects/WjCryptLibTest/WjCryptLibTest was failing. Investing why led me to discovering a problem with the size of a stack buffer in the code which tests AES-CBC.
On x86-64, the AES-CBC test fails because the vector local buffer is to small to hold the encrypted test vector: the vector was created with 64 bytes while the buffer can only hold 48.
This Pull Requests increases TEST_VECTOR_OUTPUT_SIZE to 64 to fix this issue.