* dll_init.cc (dll_list::alloc): Take long UNC paths into account.

This commit is contained in:
Corinna Vinschen 2012-07-02 14:14:01 +00:00
parent 1809b65e23
commit 26e603454f
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2012-07-02 Corinna Vinschen <corinna@vinschen.de>
* dll_init.cc (dll_list::alloc): Take long UNC paths into account.
2012-07-01 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Add some more optimization flags for cygwait, malloc and

View File

@ -180,7 +180,14 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
GetModuleFileNameW (h, buf, sizeof (buf));
PWCHAR name = buf;
if (!wcsncmp (name, L"\\\\?\\", 4))
name += 4;
{
name += 4;
if (!wcsncmp (name, L"UNC\\", 4))
{
name += 2;
*name = L'\\';
}
}
DWORD namelen = wcslen (name);
PWCHAR modname = wcsrchr (name, L'\\') + 1;