diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-25 16:31:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-25 16:31:51 +0000 |
commit | ef2c325f5e3c437b722bb96bf369ba2a5c541163 (patch) | |
tree | dc85f0dc98dce1937b459d8d3882473f25db03c3 /src/proto/hashtab.pro | |
parent | c1cf4c91072f91b6b8dd636627a4ddf6f4b21f16 (diff) |
patch 9.0.0949: crash when unletting a variable while listing variablesv9.0.0949
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435)
Diffstat (limited to 'src/proto/hashtab.pro')
-rw-r--r-- | src/proto/hashtab.pro | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/proto/hashtab.pro b/src/proto/hashtab.pro index 21794ed6fd..320889edce 100644 --- a/src/proto/hashtab.pro +++ b/src/proto/hashtab.pro @@ -1,13 +1,14 @@ /* hashtab.c */ void hash_init(hashtab_T *ht); +int check_hashtab_frozen(hashtab_T *ht, char *command); void hash_clear(hashtab_T *ht); void hash_clear_all(hashtab_T *ht, int off); hashitem_T *hash_find(hashtab_T *ht, char_u *key); hashitem_T *hash_lookup(hashtab_T *ht, char_u *key, hash_T hash); void hash_debug_results(void); -int hash_add(hashtab_T *ht, char_u *key); +int hash_add(hashtab_T *ht, char_u *key, char *command); int hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash); -void hash_remove(hashtab_T *ht, hashitem_T *hi); +int hash_remove(hashtab_T *ht, hashitem_T *hi, char *command); void hash_lock(hashtab_T *ht); void hash_lock_size(hashtab_T *ht, int size); void hash_unlock(hashtab_T *ht); |