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/if_py_both.h | |
parent | c1cf4c91072f91b6b8dd636627a4ddf6f4b21f16 (diff) | |
download | vim-git-ef2c325f5e3c437b722bb96bf369ba2a5c541163.tar.gz |
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/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 2857cc705..d6cb13b83 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -1768,7 +1768,7 @@ _DictionaryItem(DictionaryObject *self, PyObject *args, int flags) return NULL; } - hash_remove(&dict->dv_hashtab, hi); + hash_remove(&dict->dv_hashtab, hi, "Python remove variable"); dictitem_free(di); } @@ -1893,7 +1893,7 @@ DictionaryAssItem( return -1; } hi = hash_find(&dict->dv_hashtab, di->di_key); - hash_remove(&dict->dv_hashtab, hi); + hash_remove(&dict->dv_hashtab, hi, "Python remove item"); dictitem_free(di); Py_XDECREF(todecref); return 0; @@ -2194,7 +2194,7 @@ DictionaryPopItem(DictionaryObject *self, PyObject *args UNUSED) return NULL; } - hash_remove(&self->dict->dv_hashtab, hi); + hash_remove(&self->dict->dv_hashtab, hi, "Python pop item"); dictitem_free(di); return ret; |