comparison src/optionstr.c @ 32677:4091ae33b9ec v9.0.1669

patch 9.0.1669: Crash syncing swapfile in new buffer when using sodium crypt Commit: https://github.com/vim/vim/commit/19e6c4fd2d262075d39cb802ea5b85f5ec92f153 Author: Christian Brabandt <cb@256bit.org> Date: Tue Jun 27 18:57:10 2023 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Tue, 27 Jun 2023 20:00:04 +0200
parents 695b50472e85
children 161ae1985d81
comparison
equal deleted inserted replaced
32676:1873e1b4b13c 32677:4091ae33b9ec
1172 // Need to update the swapfile. 1172 // Need to update the swapfile.
1173 ml_set_crypt_key(curbuf, args->os_oldval.string, 1173 ml_set_crypt_key(curbuf, args->os_oldval.string,
1174 *curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm); 1174 *curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
1175 changed_internal(); 1175 changed_internal();
1176 } 1176 }
1177 # ifdef FEAT_SODIUM
1178 if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
1179 crypt_sodium_lock_key(args->os_newval.string);
1180 # endif
1177 1181
1178 return NULL; 1182 return NULL;
1179 } 1183 }
1180 1184
1181 /* 1185 /*