summaryrefslogtreecommitdiffstats
path: root/src/dosinst.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-18 22:19:33 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-18 22:19:33 +0100
commitbbd854dc57e82937eb7b95af220a2f137ded64f8 (patch)
treed7c7c22262d21d1b51634a636bf1202907b01bf5 /src/dosinst.c
parent44b443c5db7a372b2da519be15dd962c552e1355 (diff)
patch 8.1.0952: compilation warnings when building the MS-Windows installerv8.1.0952
Problem: Compilation warnings when building the MS-Windows installer. Solution: Fix buffer sizes. (Yasuhiro Matsumoto, closes #3999)
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dosinst.c b/src/dosinst.c
index 7025eb6184..8ef72f6f21 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -456,7 +456,7 @@ window_cb(HWND hwnd, LPARAM lparam)
static int
run_silent_uninstall(char *uninst_exe)
{
- char vimrt_dir[BUFSIZE];
+ char vimrt_dir[MAX_PATH];
char temp_uninst[BUFSIZE];
char temp_dir[MAX_PATH];
char buf[BUFSIZE * 2 + 10];
@@ -505,7 +505,7 @@ uninstall_check(int skip_question)
HKEY uninstall_key_handle;
char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
char subkey_name_buff[BUFSIZE];
- char temp_string_buffer[BUFSIZE];
+ char temp_string_buffer[BUFSIZE-2];
DWORD local_bufsize = BUFSIZE;
FILETIME temp_pfiletime;
DWORD key_index;
@@ -1614,7 +1614,7 @@ install_registry(void)
const char *vim_ext_ThreadingModel = "Apartment";
const char *vim_ext_name = "Vim Shell Extension";
const char *vim_ext_clsid = "{51EEE242-AD87-11d3-9C1E-0090278BBD99}";
- char vim_exe_path[BUFSIZE];
+ char vim_exe_path[MAX_PATH];
char display_name[BUFSIZE];
char uninstall_string[BUFSIZE];
char icon_string[BUFSIZE];
@@ -1869,7 +1869,7 @@ build_link_name(
const char *link_name,
const char *shell_folder_name)
{
- char shell_folder_path[BUFSIZE];
+ char shell_folder_path[MAX_PATH];
if (get_shell_folder_path(shell_folder_path, shell_folder_name) == FAIL)
{
@@ -2278,8 +2278,8 @@ install_vimfilesdir(int idx)
int i;
int vimfiles_dir_choice = choices[idx].arg;
char *p;
- char vimdir_path[BUFSIZE];
- char vimfiles_path[BUFSIZE];
+ char vimdir_path[MAX_PATH];
+ char vimfiles_path[MAX_PATH + 9];
char tmp_dirname[BUFSIZE];
/* switch on the location that the user wants the plugin directories