0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.1669: Crash syncing swapfile in new buffer when using sodium crypt

Problem:    Crash syncing swapfile in new buffer when using sodium crypt.
            (James McCoy)
Solution:   Add checks for sodium encryption. (Christian Brabandt,
            closes #12591, closes #12585)
This commit is contained in:
Christian Brabandt
2023-06-27 18:57:10 +01:00
committed by Bram Moolenaar
parent 0256d76a33
commit 19e6c4fd2d
6 changed files with 72 additions and 14 deletions

View File

@@ -1174,6 +1174,10 @@ did_set_cryptkey(optset_T *args)
*curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
changed_internal();
}
# ifdef FEAT_SODIUM
if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
crypt_sodium_lock_key(args->os_newval.string);
# endif
return NULL;
}