4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when comparing a recursively looped List or Dictionary.
12 Solution: Limit recursiveness for comparing to 1000.
16 *** ../vim-7.0.133/src/eval.c Tue Oct 10 12:56:09 2006
17 --- src/eval.c Sun Oct 15 15:08:13 2006
21 char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
24 ! if (tv1->v_type != tv2->v_type)
31 ! return list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
35 ! return dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
38 return (tv1->vval.v_string != NULL
41 char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
43 + static int recursive = 0; /* cach recursive loops */
46 ! /* Catch lists and dicts that have an endless loop by limiting
47 ! * recursiveness to 1000. */
48 ! if (tv1->v_type != tv2->v_type || recursive >= 1000)
55 ! r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
61 ! r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
66 return (tv1->vval.v_string != NULL
67 *** ../vim-7.0.133/src/version.c Sat Oct 14 14:33:21 2006
68 --- src/version.c Sun Oct 15 15:03:30 2006
72 { /* Add new patch number below this line */
78 It was recently discovered that research causes cancer in rats.
80 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
81 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
82 \\\ download, build and distribute -- http://www.A-A-P.org ///
83 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///