diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-13 10:27:40 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-13 10:27:40 +0000 |
commit | 5300be620c77950caa5296019408ee02e60097e8 (patch) | |
tree | dee544e252d0f476bcafbc2b5e05b886e4592aa7 /src/job.c | |
parent | 606efc7df4c94104bbd24248106dd0e4ee6f7cfa (diff) | |
download | vim-git-5300be620c77950caa5296019408ee02e60097e8.tar.gz |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) { |