]> sourceware.org Git - newlib-cygwin.git/commitdiff
* pseudo-reloc.cc (__report_error): Raise size of module name buffer to
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 19 May 2014 16:56:31 +0000 (16:56 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 19 May 2014 16:56:31 +0000 (16:56 +0000)
PATH_MAX.  Fix length in call to GetModuleFileNameW (CID 59947).

winsup/cygwin/ChangeLog
winsup/cygwin/pseudo-reloc.cc

index 2a5724e460a97da9b41b588019f7cee3976961d4..3ff4f896c9a422e78caf6fa7daa189b184e61fd5 100644 (file)
@@ -1,3 +1,8 @@
+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
index 00c58d7a8a780737ed149603c4094cba1ec1bf14..bdcde2a4b05861d41b996a0752d6c89348a59d16 100644 (file)
@@ -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 */
This page took 0.031317 seconds and 5 git commands to generate.