lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.86k stars 292 forks source link

Replaced logic of reusing key as an IV #692

Closed rui-rafael-lastpass closed 5 months ago

rui-rafael-lastpass commented 5 months ago

Before this change, the call to aes_encrypt_byteswas reusing the key as an IV for the encryption process. To fix this, the call to aes_encrypt_byteswas substituted with a call to aes_encryptwhich internally generates a pseudo-random IV based on OpenSSL RAND_bytes.

Also fixed a memory leak due to xcalloc.