mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
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.
This commit is contained in:
@@ -6256,6 +6256,8 @@ spell_add_word(
|
|||||||
{
|
{
|
||||||
fpos = fpos_next;
|
fpos = fpos_next;
|
||||||
fpos_next = ftell(fd);
|
fpos_next = ftell(fd);
|
||||||
|
if (fpos_next < 0)
|
||||||
|
break; // should never happen
|
||||||
if (STRNCMP(word, line, len) == 0
|
if (STRNCMP(word, line, len) == 0
|
||||||
&& (line[len] == '/' || line[len] < ' '))
|
&& (line[len] == '/' || line[len] < ' '))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4473,
|
||||||
/**/
|
/**/
|
||||||
4472,
|
4472,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user