]> granicus.if.org Git - vim/commitdiff
patch 8.1.0952: compilation warnings when building the MS-Windows installer v8.1.0952
authorBram Moolenaar <Bram@vim.org>
Mon, 18 Feb 2019 21:19:33 +0000 (22:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 18 Feb 2019 21:19:33 +0000 (22:19 +0100)
Problem:    Compilation warnings when building the MS-Windows installer.
Solution:   Fix buffer sizes. (Yasuhiro Matsumoto, closes #3999)

src/dosinst.c
src/dosinst.h
src/uninstal.c
src/version.c

index 7025eb6184356867f3aa7739db51b8523d6df2ae..8ef72f6f216a7b9de0c12abde2e1597a37393b80 100644 (file)
@@ -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
index 59de932489cfaa9a0e1c9954e66e32504b4035f0..f264f945e732456190567ef66ca38716106b639d 100644 (file)
@@ -388,7 +388,7 @@ char *(icon_link_names[ICON_COUNT]) =
 run_command(char *cmd)
 {
     char       *cmd_path;
-    char       cmd_buf[BUFSIZE];
+    char       cmd_buf[BUFSIZE * 2 + 35];
     char       *p;
 
     /* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
@@ -498,7 +498,7 @@ remove_tail(char *path)
 }
 
 
-char   installdir[BUFSIZE];    /* top of the installation dir, where the
+char   installdir[MAX_PATH-9]; /* top of the installation dir, where the
                                   install.exe is located, E.g.:
                                   "c:\vim\vim60" */
 int    runtimeidx;             /* index in installdir[] where "vim60" starts */
index 11b6c629ad195029840382cb60e7af76c7351916..d0d0b0682c3ae9af4f7a7bdd72d0b494ef6e6846 100644 (file)
@@ -321,8 +321,8 @@ main(int argc, char *argv[])
     int                i;
     struct stat st;
     char       icon[BUFSIZE];
-    char       path[BUFSIZE];
-    char       popup_path[BUFSIZE];
+    char       path[MAX_PATH];
+    char       popup_path[MAX_PATH];
 
     /* The nsis uninstaller calls us with a "-nsis" argument. */
     if (argc == 2 && stricmp(argv[1], "-nsis") == 0)
index ee3404233181e2ebe306f3bec1e19d9db7c7dbbc..16ab493919613cf6db78ec4879be2994d86d4642 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    952,
 /**/
     951,
 /**/