0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0253: crash when using :disassamble without argument

Problem:    Crash when using :disassamble without argument. (Dhiraj Mishra)
Solution:   Check for missing argument. (Dominique Pelle, closes #5635,
            closes #5637)
This commit is contained in:
Bram Moolenaar
2020-02-13 21:29:32 +01:00
parent 3dd64608f6
commit 21456cdccb
4 changed files with 15 additions and 2 deletions

View File

@@ -1590,6 +1590,7 @@ failed:
void
ex_disassemble(exarg_T *eap)
{
char_u *arg = eap->arg;
char_u *fname;
ufunc_T *ufunc;
dfunc_T *dfunc;
@@ -1598,8 +1599,14 @@ ex_disassemble(exarg_T *eap)
int line_idx = 0;
int prev_current = 0;
fname = trans_function_name(&eap->arg, FALSE,
fname = trans_function_name(&arg, FALSE,
TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL);
if (fname == NULL)
{
semsg(_(e_invarg2), eap->arg);
return;
}
ufunc = find_func(fname, NULL);
vim_free(fname);
if (ufunc == NULL)