patch 9.0.0949: crash when unletting a variable while listing variables
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435)
diff --git a/src/textprop.c b/src/textprop.c
index dee35c3..789ab8f 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1789,7 +1789,7 @@
}
hash_init(*htp);
}
- hash_add(*htp, PT2HIKEY(prop));
+ hash_add(*htp, PT2HIKEY(prop), "prop type");
}
else
{
@@ -1924,7 +1924,7 @@
ht = buf->b_proptypes;
VIM_CLEAR(buf->b_proparray);
}
- hash_remove(ht, hi);
+ hash_remove(ht, hi, "prop type delete");
vim_free(prop);
}
}