From: Bram Moolenaar Date: Mon, 28 Mar 2016 20:44:50 +0000 (+0200) Subject: patch 7.4.1681 X-Git-Tag: v7.4.1681 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef9d9b94a8803c405884bb6914ed745ede57c596;p=thirdparty%2Fvim.git patch 7.4.1681 Problem: Coverity warns for fixed size buffer length (false positive). Solution: Add a check for the name length. --- diff --git a/src/eval.c b/src/eval.c index cd7ce25cd9..1516fe596c 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 4778bfecdc..26928e95b1 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, /**/