comparison src/vim9execute.c @ 19390:e4b326c9424a v8.2.0253

patch 8.2.0253: crash when using :disassamble without argument Commit: https://github.com/vim/vim/commit/21456cdccbdf9d222938139769f1abe95b8effdd Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 13 21:29:32 2020 +0100 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 https://github.com/vim/vim/issues/5635, closes #5637)
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Feb 2020 21:30:09 +0100
parents 8ff84bc1c89b
children bc880a130120
comparison
equal deleted inserted replaced
19389:e85beb3a479f 19390:e4b326c9424a
1588 * so always include this. 1588 * so always include this.
1589 */ 1589 */
1590 void 1590 void
1591 ex_disassemble(exarg_T *eap) 1591 ex_disassemble(exarg_T *eap)
1592 { 1592 {
1593 char_u *arg = eap->arg;
1593 char_u *fname; 1594 char_u *fname;
1594 ufunc_T *ufunc; 1595 ufunc_T *ufunc;
1595 dfunc_T *dfunc; 1596 dfunc_T *dfunc;
1596 isn_T *instr; 1597 isn_T *instr;
1597 int current; 1598 int current;
1598 int line_idx = 0; 1599 int line_idx = 0;
1599 int prev_current = 0; 1600 int prev_current = 0;
1600 1601
1601 fname = trans_function_name(&eap->arg, FALSE, 1602 fname = trans_function_name(&arg, FALSE,
1602 TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL); 1603 TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD | TFN_NO_DEREF, NULL, NULL);
1604 if (fname == NULL)
1605 {
1606 semsg(_(e_invarg2), eap->arg);
1607 return;
1608 }
1609
1603 ufunc = find_func(fname, NULL); 1610 ufunc = find_func(fname, NULL);
1604 vim_free(fname); 1611 vim_free(fname);
1605 if (ufunc == NULL) 1612 if (ufunc == NULL)
1606 { 1613 {
1607 semsg("E1061: Cannot find function %s", eap->arg); 1614 semsg("E1061: Cannot find function %s", eap->arg);