forked from aniani/vim
patch 8.2.3589: failure when "term_rows" of term_start() is an unusual value
Problem: Failure when the "term_rows" argument of term_start() is an unusual value. Solution: Limit to range of zero to 1000. (closes #9116)
This commit is contained in:
@@ -432,6 +432,11 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
|
||||
opt->jo_term_rows = tv_get_number_chk(item, &error);
|
||||
if (error)
|
||||
return FAIL;
|
||||
if (opt->jo_term_rows < 0 || opt->jo_term_rows > 1000)
|
||||
{
|
||||
semsg(_(e_invargval), "term_rows");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "term_cols") == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user