0
0
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:
Bram Moolenaar
2013-11-04 00:34:53 +01:00
parent d5d015d457
commit ba2d7ffc4b
6 changed files with 17 additions and 0 deletions

View File

@@ -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);