summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-25 21:47:48 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-25 21:47:48 +0000
commit416b5f4894196947ea87eea2ed4fda3504674f72 (patch)
tree2fe7331a7f9720c9c1b04acc0011f7be58505e15
parent9383a3afb6a2b7ba6a2739a66a68cc8e1162f389 (diff)
downloadvim-git-8.2.4473.tar.gz
patch 8.2.4473: Coverity warnds for not checking return value of ftell()v8.2.4473
Problem: Coverity warnds for not checking return value of ftell(). Solution: Bail out if ftell() returns a negative value.
-rw-r--r--src/spellfile.c2
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 370e80b81..ad0d00021 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -6256,6 +6256,8 @@ spell_add_word(
{
fpos = fpos_next;
fpos_next = ftell(fd);
+ if (fpos_next < 0)
+ break; // should never happen
if (STRNCMP(word, line, len) == 0
&& (line[len] == '/' || line[len] < ' '))
{
diff --git a/src/version.c b/src/version.c
index e0384c8ef..7b5d66a84 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4473,
+/**/
4472,
/**/
4471,