Fix SAL annotation in private DML EP interface (#14639)

In #14461 I added a private interface to MLOperatorAuthorPrivate.h to
pipe ORT node names through to the debug name of DML operators/graphs.
The wrong SAL annotation was used on the `Get*Name` methods, which
confused static analysis tools into thinking there is a potential buffer
overrun.
This commit is contained in:
Justin Stoecker 2023-02-09 10:27:20 -08:00 committed by GitHub
parent c5b485d25f
commit 23f0e44265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,7 +67,7 @@ IMLOperatorKernelCreationContextNodeWrapperPrivate : public IMLOperatorKernelCre
//! Writes the node name and null terminator into a char buffer.
STDMETHOD(GetUtf8Name)(
uint32_t bufferSizeInBytes,
_Out_writes_(bufferSizeInBytes) char* name
_Out_writes_bytes_(bufferSizeInBytes) char* name
) const noexcept PURE;
//! Gets the minimum size of a wchar buffer to store the node name (including null terminator).
@ -77,7 +77,7 @@ IMLOperatorKernelCreationContextNodeWrapperPrivate : public IMLOperatorKernelCre
//! Writes the node name and null terminator into a wchar buffer.
STDMETHOD(GetWideName)(
uint32_t bufferSizeInBytes,
_Out_writes_(bufferSizeInBytes) wchar_t* name
_Out_writes_bytes_(bufferSizeInBytes) wchar_t* name
) const noexcept PURE;
};