aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellfile.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-09-17 10:47:17 -0400
committerGitHub <noreply@github.com>2021-09-17 10:47:17 -0400
commitd56002f7b722facd97b0958e141c8ed2d01495f7 (patch)
tree46e0a3bc02ba86b08e5dbf0cfeae7e615fae5b21 /src/nvim/spellfile.c
parent867e8885991ae450019c18aa5e42546bd4b62c2c (diff)
parent1e0d563967d139dfe5f42993c90f888c5a48c634 (diff)
downloadrneovim-d56002f7b722facd97b0958e141c8ed2d01495f7.tar.gz
rneovim-d56002f7b722facd97b0958e141c8ed2d01495f7.tar.bz2
rneovim-d56002f7b722facd97b0958e141c8ed2d01495f7.zip
Merge pull request #15364 from seandewar/vim-8.2.3337
vim-patch:8.2.{3286,3289,3293,3298,3313,3321,3328,3330,3331,3337,3354,3355,3357,3360,3369,3375}
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r--src/nvim/spellfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 8b95178c84..843ecec1b1 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -1371,6 +1371,9 @@ static int read_compound(FILE *fd, slang_T *slang, int len)
gap = &slang->sl_comppat;
c = get2c(fd); // <comppatcount>
+ if (c < 0) {
+ return SP_TRUNCERROR;
+ }
todo -= 2;
ga_init(gap, sizeof(char_u *), c);
ga_grow(gap, c);