1
0
forked from aniani/vim

patch 9.0.1202: crash when iterating over list of objects

Problem:    Crash when iterating over list of objects.
Solution:   Do not make a copy of tt_member for object or class.
            (closes #11823)
This commit is contained in:
Bram Moolenaar
2023-01-15 16:54:57 +00:00
parent 4cae845ce3
commit f450804e14
3 changed files with 25 additions and 1 deletions

View File

@@ -86,7 +86,8 @@ copy_type_deep_rec(type_T *type, garray_T *type_gap, garray_T *seen_types)
((type_T **)seen_types->ga_data)[seen_types->ga_len * 2 + 1] = copy;
++seen_types->ga_len;
if (copy->tt_member != NULL)
if (copy->tt_member != NULL
&& copy->tt_type != VAR_OBJECT && copy->tt_type != VAR_CLASS)
copy->tt_member = copy_type_deep_rec(copy->tt_member,
type_gap, seen_types);