Skip to content

Commit

Permalink
patch 8.2.4985: PVS warns for possible array underrun
Browse files Browse the repository at this point in the history
Problem:    PVS warns for possible array underrun.
Solution:   Add a check for a positive value. (closes #10451)
  • Loading branch information
brammool committed May 20, 2022
1 parent 6dab00a commit 875339b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/spell.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ spell_check(
MAXWLEN + 1);
mi.mi_fwordlen = (int)STRLEN(mi.mi_fword);

if (camel_case)
if (camel_case && mi.mi_fwordlen > 0)
// Introduce a fake word end space into the folded word.
mi.mi_fword[mi.mi_fwordlen - 1] = ' ';

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4985,
/**/
4984,
/**/
Expand Down

0 comments on commit 875339b

Please sign in to comment.