-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Actual behavior
For ITypeInfo COM object:
internal static unsafe void GetNames(this winmdroot.System.Com.ITypeInfo @this, int memid, out SysFreeStringSafeHandle rgBstrNames, uint cMaxNames, out uint pcNames)
{
winmdroot.Foundation.BSTR rgBstrNamesLocal;
@this.GetNames(memid, &rgBstrNamesLocal, cMaxNames, out pcNames);
rgBstrNames = new SysFreeStringSafeHandle(rgBstrNamesLocal, ownsHandle: true);
}Expected behavior
Either an array is provided on the out parameter, or the cMaxNames parameter is replaced with a constant 1.
Repro steps
NativeMethods.txtcontent:
ITypeInfo
NativeMethods.jsoncontent (if present):
- Any of your own code that should be shared?
// cause a buffer overrun
info.GetNames(func.memid, out SysFreeStringSafeHandle name, 2, out uint names);Context
- CsWin32 version: 0.3.183
- Target Framework: net9.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working