Skip to content

Commit

Permalink
Fix SAL annotation in private DML EP interface (microsoft#14639)
Browse files Browse the repository at this point in the history
In microsoft#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.
  • Loading branch information
jstoecker authored and preetha-intel committed Feb 15, 2023
1 parent 112a46f commit fcae80f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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;
};

Expand Down

0 comments on commit fcae80f

Please sign in to comment.