mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4128: crash when method cannot be found
Problem: Crash when method cannot be found. (Christian J. Robinson) Solution: Don't mix up pointer names.
This commit is contained in:
@@ -4050,16 +4050,21 @@ eval_method(
|
||||
if (**arg != '(' && alias == NULL
|
||||
&& (paren = vim_strchr(*arg, '(')) != NULL)
|
||||
{
|
||||
char_u *deref;
|
||||
|
||||
*arg = name;
|
||||
*paren = NUL;
|
||||
name = deref_function_name(arg, &tofree, evalarg, verbose);
|
||||
if (name == NULL)
|
||||
deref = deref_function_name(arg, &tofree, evalarg, verbose);
|
||||
if (deref == NULL)
|
||||
{
|
||||
*arg = name + len;
|
||||
ret = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = deref;
|
||||
len = STRLEN(name);
|
||||
}
|
||||
*paren = '(';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user