summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-05-19 16:56:31 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-05-19 16:56:31 +0000
commitd7dd11b8f37c9a25adb43edf9ddc0c3322e5f15c (patch)
tree1b066eeb1cb839dca283f654ce6691114091e976
parente0f53cfe6ab8f0c52cfebdfafc4d03a692770228 (diff)
downloadcygnal-d7dd11b8f37c9a25adb43edf9ddc0c3322e5f15c.tar.gz
cygnal-d7dd11b8f37c9a25adb43edf9ddc0c3322e5f15c.tar.bz2
cygnal-d7dd11b8f37c9a25adb43edf9ddc0c3322e5f15c.zip
* pseudo-reloc.cc (__report_error): Raise size of module name buffer to
PATH_MAX. Fix length in call to GetModuleFileNameW (CID 59947).
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pseudo-reloc.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2a5724e46..3ff4f896c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+ * pseudo-reloc.cc (__report_error): Raise size of module name buffer to
+ PATH_MAX. Fix length in call to GetModuleFileNameW (CID 59947).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
* net.cc (call_gaa): Fix setting pa_ret pointer in case of an error
from GetAdaptersAddresses (CID 60218).
(get_ifs): Add missing braces in AF_INET6 case which broke netmask
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index 00c58d7a8..bdcde2a4b 100644
--- a/winsup/cygwin/pseudo-reloc.cc
+++ b/winsup/cygwin/pseudo-reloc.cc
@@ -85,12 +85,12 @@ __report_error (const char *msg, ...)
* cygwin ptys.
*/
char buf[128];
- WCHAR module[MAX_PATH];
+ WCHAR module[PATH_MAX];
char * posix_module = NULL;
static const char UNKNOWN_MODULE[] = "<unknown module>: ";
static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
HANDLE errh = GetStdHandle (STD_ERROR_HANDLE);
- ssize_t modulelen = GetModuleFileNameW (NULL, module, sizeof (module));
+ ssize_t modulelen = GetModuleFileNameW (NULL, module, PATH_MAX);
va_list args;
/* FIXME: cleanup further to avoid old use of cygwin_internal */