# HG changeset patch
# User ZyX <[email protected]>
# Date 1366489636 -14400
# Branch python-extended-2
# Node ID 4cacac640f4a6dfa52759a2c18b50afcd3e39627
# Parent ef93c86c326eaf3ff86a6f1a5a85a0efac52621f
Fix possible crash (PyMapping_Items not necessary succeeds)
diff -r ef93c86c326e -r 4cacac640f4a src/if_py_both.h
--- a/src/if_py_both.h Sat Apr 20 20:23:51 2013 +0400
+++ b/src/if_py_both.h Sun Apr 21 00:27:16 2013 +0400
@@ -737,7 +737,8 @@
tv->v_type = VAR_DICT;
tv->vval.v_dict = d;
- list = PyMapping_Items(obj);
+ if (!(list = PyMapping_Items(obj)))
+ return -1;
lsize = PyList_Size(list);
while (lsize--)
{
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
*** /tmp/extdiff.XMXOQk/vim.ef93c86c326e/src/if_py_both.h 2013-04-23 21:28:43.463891728 +0400
--- vim.4cacac640f4a/src/if_py_both.h 2013-04-23 21:28:43.466891641 +0400
***************
*** 737,743 ****
tv->v_type = VAR_DICT;
tv->vval.v_dict = d;
! list = PyMapping_Items(obj);
lsize = PyList_Size(list);
while (lsize--)
{
--- 737,744 ----
tv->v_type = VAR_DICT;
tv->vval.v_dict = d;
! if (!(list = PyMapping_Items(obj)))
! return -1;
lsize = PyList_Size(list);
while (lsize--)
{