changeset 4317:4281875776fb v7.3.908

updated for version 7.3.908 Problem: Possible crash when using a list in Python. Solution: Return early if the list is NULL. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Apr 2013 13:10:41 +0200
parents 8eee7f05d0c3
children f19b589e1e8d
files src/if_py_both.h src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -738,6 +738,8 @@ pymap_to_tv(PyObject *obj, typval_T *tv,
     tv->vval.v_dict = d;
 
     list = PyMapping_Items(obj);
+    if (list == NULL)
+	return -1;
     lsize = PyList_Size(list);
     while (lsize--)
     {
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    908,
+/**/
     907,
 /**/
     906,