mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.4.063
Problem: Crash when using invalid key in Python dictionary. Solution: Check for object to be NULL. Add tests. (ZyX)
This commit is contained in:
@@ -1624,6 +1624,9 @@ DictionaryContains(DictionaryObject *self, PyObject *keyObject)
|
||||
PyObject *rObj = _DictionaryItem(self, keyObject, DICT_FLAG_RETURN_BOOL);
|
||||
int ret;
|
||||
|
||||
if (rObj == NULL)
|
||||
return -1;
|
||||
|
||||
ret = (rObj == Py_True);
|
||||
|
||||
Py_DECREF(rObj);
|
||||
|
Reference in New Issue
Block a user