Mercurial > vim
comparison src/vim9execute.c @ 31231:684e6dfa2fba v9.0.0949
patch 9.0.0949: crash when unletting a variable while listing variables
Commit: https://github.com/vim/vim/commit/ef2c325f5e3c437b722bb96bf369ba2a5c541163
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 25 16:31:51 2022 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 25 Nov 2022 17:45:04 +0100 |
parents | 360f286b5869 |
children | 307f68a41b03 |
comparison
equal
deleted
inserted
replaced
31230:e93800d75da2 | 31231:684e6dfa2fba |
---|---|
2364 NULL, FALSE) | 2364 NULL, FALSE) |
2365 || var_check_ro(di->di_flags, | 2365 || var_check_ro(di->di_flags, |
2366 NULL, FALSE)) | 2366 NULL, FALSE)) |
2367 status = FAIL; | 2367 status = FAIL; |
2368 else | 2368 else |
2369 dictitem_remove(d, di); | 2369 dictitem_remove(d, di, "unlet"); |
2370 } | 2370 } |
2371 } | 2371 } |
2372 } | 2372 } |
2373 else if (tv_dest->v_type == VAR_LIST) | 2373 else if (tv_dest->v_type == VAR_LIST) |
2374 { | 2374 { |