mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
eval: Fix segfault caused by passing invalid callback to jobstart
This commit is contained in:
parent
5bd85fd954
commit
17db7f1e14
@ -5963,11 +5963,12 @@ static bool get_dict_callback(dict_T *d, char *key, ufunc_T **result)
|
|||||||
|
|
||||||
uint8_t *name = di->di_tv.vval.v_string;
|
uint8_t *name = di->di_tv.vval.v_string;
|
||||||
uint8_t *n = name;
|
uint8_t *n = name;
|
||||||
ufunc_T *rv;
|
ufunc_T *rv = NULL;
|
||||||
if (*n > '9' || *n < '0') {
|
if (*n > '9' || *n < '0') {
|
||||||
n = trans_function_name(&n, false, TFN_INT|TFN_QUIET, NULL);
|
if ((n = trans_function_name(&n, false, TFN_INT|TFN_QUIET, NULL))) {
|
||||||
rv = find_func(n);
|
rv = find_func(n);
|
||||||
free(n);
|
free(n);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// dict function, name is already translated
|
// dict function, name is already translated
|
||||||
rv = find_func(n);
|
rv = find_func(n);
|
||||||
|
Loading…
Reference in New Issue
Block a user