changeset 23841:ba4f8569ff8a v8.2.2462

patch 8.2.2462: Coverity warns for not checking for fseek() error Commit: https://github.com/vim/vim/commit/2c363a2e95ee0b366e72063d093d20e025ef4a66 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 3 20:14:23 2021 +0100 patch 8.2.2462: Coverity warns for not checking for fseek() error Problem: Coverity warns for not checking for fseek() error. Solution: Give an error message if fseek() fails.
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Feb 2021 20:15:04 +0100
parents 403b0fa5bd37
children cfb7e7e26037
files src/spellfile.c src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -6277,7 +6277,11 @@ spell_add_word(
 							 len, word, NameBuff);
 			}
 		    }
-		    fseek(fd, fpos_next, SEEK_SET);
+		    if (fseek(fd, fpos_next, SEEK_SET) != 0)
+		    {
+			PERROR(_("Seek error in spellfile"));
+			break;
+		    }
 		}
 	    }
 	    if (fd != NULL)
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2462,
+/**/
     2461,
 /**/
     2460,