From 416b5f4894196947ea87eea2ed4fda3504674f72 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 25 Feb 2022 21:47:48 +0000 Subject: patch 8.2.4473: Coverity warnds for not checking return value of ftell() Problem: Coverity warnds for not checking return value of ftell(). Solution: Bail out if ftell() returns a negative value. --- src/spellfile.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') 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 @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4473, /**/ 4472, /**/ -- cgit v1.2.1