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.
diff --git a/src/spellfile.c b/src/spellfile.c
index 370e80b..ad0d000 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -6256,6 +6256,8 @@
{
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] < ' '))
{