diff options
author | Bram Moolenaar <bram@vim.org> | 2013-04-24 13:10:41 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2013-04-24 13:10:41 +0200 |
commit | 6d802f9cc270c9d1c5229befa87df1d3242918cb (patch) | |
tree | e78be06be597cdedd47f128597f1a642070865bb | |
parent | 2572c1f2e9219e4cd229d4f3fc443dc237b88997 (diff) | |
download | vim-6d802f9cc270c9d1c5229befa87df1d3242918cb.tar.gz |
Problem: Possible crash when using a list in Python.
Solution: Return early if the list is NULL. (ZyX)
-rw-r--r-- | src/if_py_both.h | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index cd808004..2739f666 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -738,6 +738,8 @@ pymap_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict) tv->vval.v_dict = d; list = PyMapping_Items(obj); + if (list == NULL) + return -1; lsize = PyList_Size(list); while (lsize--) { diff --git a/src/version.c b/src/version.c index 1aeeb562..4e0a6a1b 100644 --- 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, |