coverity/135578: Memory - illegal accesses

Harmless issue, but doesn't hurt to satisfy coverity here.
This commit is contained in:
Justin M. Keyes
2016-02-16 04:25:59 -05:00
parent 5af9ae9e60
commit 9648bf795a

View File

@@ -3294,7 +3294,7 @@ static void syn_cmd_onoff(exarg_T *eap, char *name)
eap->nextcmd = check_nextcmd(eap->arg);
if (!eap->skip) {
char buf[100];
strncpy(buf, "so ", 3);
strncpy(buf, "so ", 4);
vim_snprintf(buf + 3, sizeof(buf) - 3, SYNTAX_FNAME, name);
do_cmdline_cmd(buf);
}