lastpass / lastpass-cli

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

Replaced logic of reusing key as an IV #692

Closed rui-rafael-lastpass closed 3 days ago

rui-rafael-lastpass commented 5 days 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.