Skip to content

Commit ef9d9b9

Browse files
committed
patch 7.4.1681
Problem: Coverity warns for fixed size buffer length (false positive). Solution: Add a check for the name length.
1 parent 925ccfd commit ef9d9b9

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/eval.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,11 @@ eval_init(void)
933933
for (i = 0; i < VV_LEN; ++i)
934934
{
935935
p = &vimvars[i];
936+
if (STRLEN(p->vv_name) > 16)
937+
{
938+
EMSG("INTERNAL: name too long, increase size of dictitem16_T");
939+
getout(1);
940+
}
936941
STRCPY(p->vv_di.di_key, p->vv_name);
937942
if (p->vv_flags & VV_RO)
938943
p->vv_di.di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1681,
751753
/**/
752754
1680,
753755
/**/

0 commit comments

Comments
 (0)