commit | ba2d7ffc4bd69175ddeffb77a7b459787baa0d92 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Nov 04 00:34:53 2013 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Nov 04 00:34:53 2013 +0100 |
tree | 938ed24d19490797dad752ba16a8893cbde3ea80 | |
parent | d5d015d4570eabc9a2da620cce906617e72ac625 [diff] [blame] |
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)
diff --git a/src/if_py_both.h b/src/if_py_both.h index 6ea0aff..7485779 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h
@@ -1624,6 +1624,9 @@ PyObject *rObj = _DictionaryItem(self, keyObject, DICT_FLAG_RETURN_BOOL); int ret; + if (rObj == NULL) + return -1; + ret = (rObj == Py_True); Py_DECREF(rObj);