1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: ":python" may crash when vimbindeval() returns None.
12 Solution: Check for v_string to be NULL. (Yukihiro Nakadaira)
13 Files: src/if_py_both.h
16 *** ../vim-7.3.682/src/if_py_both.h 2012-09-21 14:00:05.000000000 +0200
17 --- src/if_py_both.h 2012-10-05 21:05:06.000000000 +0200
21 if (our_tv->v_type == VAR_STRING)
23 ! result = Py_BuildValue("s", our_tv->vval.v_string);
25 else if (our_tv->v_type == VAR_NUMBER)
29 if (our_tv->v_type == VAR_STRING)
31 ! result = Py_BuildValue("s", our_tv->vval.v_string == NULL
32 ! ? "" : (char *)our_tv->vval.v_string);
34 else if (our_tv->v_type == VAR_NUMBER)
41 ! return PyBytes_FromString((char *) tv->vval.v_string);
43 return PyLong_FromLong((long) tv->vval.v_number);
49 ! return PyBytes_FromString(tv->vval.v_string == NULL
50 ! ? "" : (char *)tv->vval.v_string);
52 return PyLong_FromLong((long) tv->vval.v_number);
57 return DictionaryNew(tv->vval.v_dict);
59 ! return FunctionNew(tv->vval.v_string);
65 return DictionaryNew(tv->vval.v_dict);
67 ! return FunctionNew(tv->vval.v_string == NULL
68 ! ? (char_u *)"" : tv->vval.v_string);
72 *** ../vim-7.3.682/src/version.c 2012-10-04 22:38:32.000000000 +0200
73 --- src/version.c 2012-10-05 21:04:19.000000000 +0200
77 { /* Add new patch number below this line */
83 SIGIRO -- irony detected (iron core dumped)
85 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
86 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
87 \\\ an exciting new programming language -- http://www.Zimbu.org ///
88 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///