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:
@@ -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;
|
||||
|
@@ -748,6 +748,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1681,
|
||||
/**/
|
||||
1680,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user