From ef9d9b94a8803c405884bb6914ed745ede57c596 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 28 Mar 2016 22:44:50 +0200 Subject: patch 7.4.1681 Problem: Coverity warns for fixed size buffer length (false positive). Solution: Add a check for the name length. --- src/eval.c | 5 +++++ src/version.c | 2 ++ 2 files changed, 7 insertions(+) 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; diff --git a/src/version.c b/src/version.c index 4778bfecd..26928e95b 100644 --- a/src/version.c +++ b/src/version.c @@ -748,6 +748,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1681, /**/ 1680, /**/ -- cgit v1.2.1