diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-28 22:44:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-28 22:44:50 +0200 |
commit | ef9d9b94a8803c405884bb6914ed745ede57c596 (patch) | |
tree | 087ac0a4b7d014b4d377da3fadb76038e8b5d0fe /src/eval.c | |
parent | 925ccfde79bf734bc89269c705cebe2d49fe6444 (diff) | |
download | vim-ef9d9b94a8803c405884bb6914ed745ede57c596.zip |
patch 7.4.1681
Problem: Coverity warns for fixed size buffer length (false positive).
Solution: Add a check for the name length.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index cd7ce25cd..1516fe596 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; |