-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Actual behavior
This P/Invoke wrapper is sending a pointer to a fixed address of the out'd ACL variable when this P/Invoke expects a buffer allocated with LocalAlloc be allocated and sent through first.
internal static unsafe winmdroot.Foundation.BOOL InitializeAcl(out winmdroot.Security.ACL pAcl, uint nAclLength, winmdroot.Security.ACE_REVISION dwAclRevision)
{
fixed (winmdroot.Security.ACL* pAclLocal = &pAcl)
{
winmdroot.Foundation.BOOL __result = PInvoke.InitializeAcl(pAclLocal, nAclLength, dwAclRevision);
return __result;
}
}Expected behavior
This wrapper should be doing a LocalAlloc() allocation to the specified size of nAclLength, sending a pointer for this through to InitializeAcl(), then the pAcl parameter should be out'ing a LocalFreeSafeHandle type to work with.
Repro steps
NativeMethods.txtcontent:
InitializeAcl
-
NativeMethods.jsoncontent (if present):
N/A -
Any of your own code that should be shared?
Context
- CsWin32 version: Latest
- Win32Metadata version: N/A
- Target Framework: net472
LangVersion: N/A
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working