To: vim_dev@googlegroups.com Subject: Patch 8.1.0952 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0952 Problem: Compilation warnings when building the MS-Windows installer. Solution: Fix buffer sizes. (Yasuhiro Matsumoto, closes #3999) Files: src/dosinst.c, src/dosinst.h, src/uninstal.c *** ../vim-8.1.0951/src/dosinst.c 2019-02-10 21:48:21.381272052 +0100 --- src/dosinst.c 2019-02-18 22:17:31.948915199 +0100 *************** *** 456,462 **** static int run_silent_uninstall(char *uninst_exe) { ! char vimrt_dir[BUFSIZE]; char temp_uninst[BUFSIZE]; char temp_dir[MAX_PATH]; char buf[BUFSIZE * 2 + 10]; --- 456,462 ---- static int run_silent_uninstall(char *uninst_exe) { ! char vimrt_dir[MAX_PATH]; char temp_uninst[BUFSIZE]; char temp_dir[MAX_PATH]; char buf[BUFSIZE * 2 + 10]; *************** *** 505,511 **** HKEY uninstall_key_handle; char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; char subkey_name_buff[BUFSIZE]; ! char temp_string_buffer[BUFSIZE]; DWORD local_bufsize = BUFSIZE; FILETIME temp_pfiletime; DWORD key_index; --- 505,511 ---- HKEY uninstall_key_handle; char *uninstall_key = "software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; char subkey_name_buff[BUFSIZE]; ! char temp_string_buffer[BUFSIZE-2]; DWORD local_bufsize = BUFSIZE; FILETIME temp_pfiletime; DWORD key_index; *************** *** 1614,1620 **** 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 display_name[BUFSIZE]; char uninstall_string[BUFSIZE]; char icon_string[BUFSIZE]; --- 1614,1620 ---- 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[MAX_PATH]; char display_name[BUFSIZE]; char uninstall_string[BUFSIZE]; char icon_string[BUFSIZE]; *************** *** 1869,1875 **** const char *link_name, const char *shell_folder_name) { ! char shell_folder_path[BUFSIZE]; if (get_shell_folder_path(shell_folder_path, shell_folder_name) == FAIL) { --- 1869,1875 ---- const char *link_name, const char *shell_folder_name) { ! char shell_folder_path[MAX_PATH]; if (get_shell_folder_path(shell_folder_path, shell_folder_name) == FAIL) { *************** *** 2278,2285 **** int i; int vimfiles_dir_choice = choices[idx].arg; char *p; ! char vimdir_path[BUFSIZE]; ! char vimfiles_path[BUFSIZE]; char tmp_dirname[BUFSIZE]; /* switch on the location that the user wants the plugin directories --- 2278,2285 ---- int i; int vimfiles_dir_choice = choices[idx].arg; char *p; ! 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 *** ../vim-8.1.0951/src/dosinst.h 2017-10-14 17:17:35.000000000 +0200 --- src/dosinst.h 2019-02-18 22:17:31.948915199 +0100 *************** *** 388,394 **** run_command(char *cmd) { char *cmd_path; ! char cmd_buf[BUFSIZE]; char *p; /* On WinNT, 'start' is a shell built-in for cmd.exe rather than an --- 388,394 ---- run_command(char *cmd) { char *cmd_path; ! char cmd_buf[BUFSIZE * 2 + 35]; char *p; /* On WinNT, 'start' is a shell built-in for cmd.exe rather than an *************** *** 498,504 **** } ! char installdir[BUFSIZE]; /* top of the installation dir, where the install.exe is located, E.g.: "c:\vim\vim60" */ int runtimeidx; /* index in installdir[] where "vim60" starts */ --- 498,504 ---- } ! 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 */ *** ../vim-8.1.0951/src/uninstal.c 2017-10-14 17:17:35.000000000 +0200 --- src/uninstal.c 2019-02-18 22:17:31.948915199 +0100 *************** *** 321,328 **** int i; struct stat st; char icon[BUFSIZE]; ! char path[BUFSIZE]; ! char popup_path[BUFSIZE]; /* The nsis uninstaller calls us with a "-nsis" argument. */ if (argc == 2 && stricmp(argv[1], "-nsis") == 0) --- 321,328 ---- int i; struct stat st; char icon[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) *** ../vim-8.1.0951/src/version.c 2019-02-18 22:14:15.198135199 +0100 --- src/version.c 2019-02-18 22:18:54.292402946 +0100 *************** *** 781,782 **** --- 781,784 ---- { /* Add new patch number below this line */ + /**/ + 952, /**/ -- An alien life briefly visits earth. Just before departing it leaves a message in the dust on the back of a white van. The world is shocked and wants to know what it means. After months of studies the worlds best linguistic scientists are able to decipher the message: "Wash me!". /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///