mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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;
|
||||
|
Reference in New Issue
Block a user