summaryrefslogtreecommitdiffstats
path: root/src/job.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-13 10:27:40 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-13 10:27:40 +0000
commit5300be620c77950caa5296019408ee02e60097e8 (patch)
treedee544e252d0f476bcafbc2b5e05b886e4592aa7 /src/job.c
parent606efc7df4c94104bbd24248106dd0e4ee6f7cfa (diff)
patch 8.2.3589: failure when "term_rows" of term_start() is an unusual valuev8.2.3589
Problem: Failure when the "term_rows" argument of term_start() is an unusual value. Solution: Limit to range of zero to 1000. (closes #9116)
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/job.c b/src/job.c
index 80cb47eeb1..a2e184b12c 100644
--- a/src/job.c
+++ b/src/job.c
@@ -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)
{