mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.0212: invalid memory access when compiling :unlet
Problem: Invalid memory access when compiling :unlet. Solution: Don't read past the end of the line.
This commit is contained in:
@@ -92,6 +92,12 @@ free_locals(cctx_T *cctx)
|
||||
int
|
||||
check_vim9_unlet(char_u *name)
|
||||
{
|
||||
if (*name == NUL)
|
||||
{
|
||||
semsg(_(e_argument_required_for_str), "unlet");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (name[1] != ':' || vim_strchr((char_u *)"gwtb", *name) == NULL)
|
||||
{
|
||||
// "unlet s:var" is allowed in legacy script.
|
||||
|
Reference in New Issue
Block a user