diff options
author | Takashi Yano via Cygwin-patches <cygwin-patches@cygwin.com> | 2021-01-20 09:57:00 +0900 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-01-20 10:19:39 +0100 |
commit | 5755870f7c369e0698409f0819e1730031b2740d (patch) | |
tree | 2c96b2311135669c26587d2af503bd4a0b127920 | |
parent | 62e739b51bb1cbe644470c40ca414d8a2ea34c18 (diff) | |
download | cygnal-5755870f7c369e0698409f0819e1730031b2740d.tar.gz cygnal-5755870f7c369e0698409f0819e1730031b2740d.tar.bz2 cygnal-5755870f7c369e0698409f0819e1730031b2740d.zip |
Cygwin: pty: Reduce buffer size in get_console_process_id().
- The buffer used in get_console_process_id(), introduced by commit
72770148, is too large and ERROR_NOT_ENOUGH_MEMORY occurs in Win7.
Therefore, the buffer size has been reduced.
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index c78e996e8..7f0752614 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -65,8 +65,8 @@ static DWORD get_console_process_id (DWORD pid, bool match) { tmp_pathbuf tp; - DWORD *list = (DWORD *) tp.w_get (); - const DWORD buf_size = NT_MAX_PATH * sizeof (WCHAR) / sizeof (DWORD); + DWORD *list = (DWORD *) tp.c_get (); + const DWORD buf_size = NT_MAX_PATH / sizeof (DWORD); DWORD num = GetConsoleProcessList (list, buf_size); if (num == 0 || num > buf_size) |