summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorErnie Rael <errael@raelity.com>2023-10-07 22:05:40 +0200
committerChristian Brabandt <cb@256bit.org>2023-10-07 22:10:26 +0200
commit9771b2a67f825bdc6e5c615141d22c665952dc86 (patch)
tree3197766895366d392c92819ddf7e811c5325c317 /src/eval.c
parent1087b8c29ab521106c5b6cc85d5b38244f0d9c1d (diff)
patch 9.0.2001: Vim9: segfault with islocked()v9.0.2001
Problem: Vim9: segfault with islocked() Solution: Check that the lval pointer is not null for objects and class variables closes: #13295 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index d9fbec234c..93109effb9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1375,6 +1375,7 @@ get_lval(
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
+ // TODO: have a message with obj/class, not just dict,
if (!quiet)
semsg(_(e_dot_can_only_be_used_on_dictionary_str), name);
return NULL;
@@ -1385,6 +1386,7 @@ get_lval(
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
+ // TODO: have a message with obj/class, not just dict/list/blob,
if (!quiet)
emsg(_(e_can_only_index_list_dictionary_or_blob));
return NULL;
@@ -1739,10 +1741,6 @@ get_lval(
}
}
- // TODO: dont' check access if inside class
- // TODO: is GLV_READ_ONLY the right thing to use
- // for class/object member access?
- // Probably in some cases. Need inside class check
if (lp->ll_valtype == NULL)
{
int m_idx;