mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1481: decrypting with libsodium may fail if the library changes
Problem: Decrypting with libsodium may fail if the library changes. Solution: Add parameters used to the encrypted file header. (Christian Brabandt, closes #12279)
This commit is contained in:
committed by
Bram Moolenaar
parent
dcd40cfca0
commit
aae583441b
@@ -2362,8 +2362,8 @@ free_buf_options(
|
||||
#endif
|
||||
#ifdef FEAT_CRYPT
|
||||
# ifdef FEAT_SODIUM
|
||||
if ((buf->b_p_key != NULL) && (*buf->b_p_key != NUL) &&
|
||||
(crypt_get_method_nr(buf) == CRYPT_M_SOD))
|
||||
if (buf->b_p_key != NULL && *buf->b_p_key != NUL
|
||||
&& crypt_method_is_sodium(crypt_get_method_nr(buf)))
|
||||
crypt_sodium_munlock(buf->b_p_key, STRLEN(buf->b_p_key));
|
||||
# endif
|
||||
clear_string_option(&buf->b_p_key);
|
||||
|
Reference in New Issue
Block a user