1
0
forked from aniani/vim

patch 7.4.1681

Problem:    Coverity warns for fixed size buffer length (false positive).
Solution:   Add a check for the name length.
This commit is contained in:
Bram Moolenaar
2016-03-28 22:44:50 +02:00
parent 925ccfde79
commit ef9d9b94a8
2 changed files with 7 additions and 0 deletions

View File

@@ -933,6 +933,11 @@ eval_init(void)
for (i = 0; i < VV_LEN; ++i)
{
p = &vimvars[i];
if (STRLEN(p->vv_name) > 16)
{
EMSG("INTERNAL: name too long, increase size of dictitem16_T");
getout(1);
}
STRCPY(p->vv_di.di_key, p->vv_name);
if (p->vv_flags & VV_RO)
p->vv_di.di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1681,
/**/
1680,
/**/