* external.cc (cygwin_internal): Use local name buffer instead of

allocated one in CW_CYGNAME_FROM_WINNAME.
This commit is contained in:
Corinna Vinschen
2014-05-16 12:13:57 +00:00
parent e9eef8ec14
commit eec106c4ec
2 changed files with 7 additions and 3 deletions

View File

@@ -650,9 +650,8 @@ cygwin_internal (cygwin_getinfo_types t, ...)
if (!winname || !buffer || !buflen)
break;
PWCHAR name;
if (!sys_mbstowcs_alloc (&name, HEAP_BUF, winname))
break;
WCHAR name[UNLEN + 1];
sys_mbstowcs (name, sizeof name, winname);
cygsid sid;
DWORD slen = SECURITY_MAX_SID_SIZE;