From dc7e00e848573c792da9c63b1e4da71989771f5d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 11 Sep 2009 11:26:56 +0000 Subject: updated for version 7.2-250 --- src/GvimExt/gvimext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/GvimExt') diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp index d317e2fff5..71d180ef91 100644 --- a/src/GvimExt/gvimext.cpp +++ b/src/GvimExt/gvimext.cpp @@ -635,7 +635,9 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu, } // Now concatenate strncpy(temp, _("Edit with existing Vim - "), BUFSIZE - 1); - strncat(temp, title, BUFSIZE - 1); + temp[BUFSIZE - 1] = '\0'; + strncat(temp, title, BUFSIZE - 1 - strlen(temp)); + temp[BUFSIZE - 1] = '\0'; InsertMenu(hMenu, indexMenu++, MF_STRING|MF_BYPOSITION, -- cgit v1.2.3