|
Karsten Hopp |
bd2c9e |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
bd2c9e |
Subject: Patch 7.3.701
|
|
Karsten Hopp |
bd2c9e |
Fcc: outbox
|
|
Karsten Hopp |
bd2c9e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
bd2c9e |
Mime-Version: 1.0
|
|
Karsten Hopp |
bd2c9e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
bd2c9e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
bd2c9e |
------------
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
Patch 7.3.701
|
|
Karsten Hopp |
bd2c9e |
Problem: MS-Windows: Crash with stack overflow when setting 'encoding'.
|
|
Karsten Hopp |
bd2c9e |
Solution: Handle that loading the iconv library may be called recursively.
|
|
Karsten Hopp |
bd2c9e |
(Jiri Sedlak)
|
|
Karsten Hopp |
bd2c9e |
Files: src/os_win32.c
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
*** ../vim-7.3.700/src/os_win32.c 2012-08-02 12:31:40.000000000 +0200
|
|
Karsten Hopp |
bd2c9e |
--- src/os_win32.c 2012-10-21 02:35:21.000000000 +0200
|
|
Karsten Hopp |
bd2c9e |
***************
|
|
Karsten Hopp |
bd2c9e |
*** 288,305 ****
|
|
Karsten Hopp |
bd2c9e |
vimLoadLib(char *name)
|
|
Karsten Hopp |
bd2c9e |
{
|
|
Karsten Hopp |
bd2c9e |
HINSTANCE dll = NULL;
|
|
Karsten Hopp |
bd2c9e |
! char old_dir[MAXPATHL];
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
if (exe_path == NULL)
|
|
Karsten Hopp |
bd2c9e |
get_exe_name();
|
|
Karsten Hopp |
bd2c9e |
! if (exe_path != NULL && mch_dirname(old_dir, MAXPATHL) == OK)
|
|
Karsten Hopp |
bd2c9e |
{
|
|
Karsten Hopp |
bd2c9e |
/* Change directory to where the executable is, both to make sure we
|
|
Karsten Hopp |
bd2c9e |
* find a .dll there and to avoid looking for a .dll in the current
|
|
Karsten Hopp |
bd2c9e |
* directory. */
|
|
Karsten Hopp |
bd2c9e |
! mch_chdir(exe_path);
|
|
Karsten Hopp |
bd2c9e |
dll = LoadLibrary(name);
|
|
Karsten Hopp |
bd2c9e |
- mch_chdir(old_dir);
|
|
Karsten Hopp |
bd2c9e |
}
|
|
Karsten Hopp |
bd2c9e |
return dll;
|
|
Karsten Hopp |
bd2c9e |
}
|
|
Karsten Hopp |
bd2c9e |
--- 288,313 ----
|
|
Karsten Hopp |
bd2c9e |
vimLoadLib(char *name)
|
|
Karsten Hopp |
bd2c9e |
{
|
|
Karsten Hopp |
bd2c9e |
HINSTANCE dll = NULL;
|
|
Karsten Hopp |
bd2c9e |
! TCHAR old_dir[MAXPATHL];
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
+ /* NOTE: Do not use mch_dirname() and mch_chdir() here, they may call
|
|
Karsten Hopp |
bd2c9e |
+ * vimLoadLib() recursively, which causes a stack overflow. */
|
|
Karsten Hopp |
bd2c9e |
if (exe_path == NULL)
|
|
Karsten Hopp |
bd2c9e |
get_exe_name();
|
|
Karsten Hopp |
bd2c9e |
! if (exe_path != NULL && GetCurrentDirectory(MAXPATHL, old_dir) != 0)
|
|
Karsten Hopp |
bd2c9e |
{
|
|
Karsten Hopp |
bd2c9e |
/* Change directory to where the executable is, both to make sure we
|
|
Karsten Hopp |
bd2c9e |
* find a .dll there and to avoid looking for a .dll in the current
|
|
Karsten Hopp |
bd2c9e |
* directory. */
|
|
Karsten Hopp |
bd2c9e |
! SetCurrentDirectory(exe_path);
|
|
Karsten Hopp |
bd2c9e |
! dll = LoadLibrary(name);
|
|
Karsten Hopp |
bd2c9e |
! SetCurrentDirectory(old_dir);
|
|
Karsten Hopp |
bd2c9e |
! }
|
|
Karsten Hopp |
bd2c9e |
! else
|
|
Karsten Hopp |
bd2c9e |
! {
|
|
Karsten Hopp |
bd2c9e |
! /* We are not able to change directory to where the executable is, try
|
|
Karsten Hopp |
bd2c9e |
! * to load library anyway. */
|
|
Karsten Hopp |
bd2c9e |
dll = LoadLibrary(name);
|
|
Karsten Hopp |
bd2c9e |
}
|
|
Karsten Hopp |
bd2c9e |
return dll;
|
|
Karsten Hopp |
bd2c9e |
}
|
|
Karsten Hopp |
bd2c9e |
*** ../vim-7.3.700/src/version.c 2012-10-21 02:17:28.000000000 +0200
|
|
Karsten Hopp |
bd2c9e |
--- src/version.c 2012-10-21 02:35:48.000000000 +0200
|
|
Karsten Hopp |
bd2c9e |
***************
|
|
Karsten Hopp |
bd2c9e |
*** 721,722 ****
|
|
Karsten Hopp |
bd2c9e |
--- 721,724 ----
|
|
Karsten Hopp |
bd2c9e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
bd2c9e |
+ /**/
|
|
Karsten Hopp |
bd2c9e |
+ 701,
|
|
Karsten Hopp |
bd2c9e |
/**/
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
--
|
|
Karsten Hopp |
bd2c9e |
BEDEVERE: And that, my lord, is how we know the Earth to be banana-shaped.
|
|
Karsten Hopp |
bd2c9e |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
bd2c9e |
|
|
Karsten Hopp |
bd2c9e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
bd2c9e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
bd2c9e |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
bd2c9e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|