[RTL] SAL-annotate RtlUnicodeStringToCountedOemString

Brought to you by Hermès
This commit is contained in:
Jérôme Gardou 2021-05-18 23:07:07 +02:00 committed by Jérôme Gardou
parent 8d1e01be0e
commit a3629ab08b
2 changed files with 16 additions and 7 deletions

View file

@ -1879,13 +1879,18 @@ RtlUnicodeStringToOemString(
BOOLEAN AllocateDestinationString
);
_IRQL_requires_max_(PASSIVE_LEVEL)
_Must_inspect_result_
NTSYSAPI
NTSTATUS
NTAPI
RtlUnicodeStringToCountedOemString(
_Inout_ POEM_STRING OemDest,
_In_ PCUNICODE_STRING UniSource,
_In_ BOOLEAN AllocateDestinationString);
_When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
_When_(!AllocateDestinationString, _Inout_)
POEM_STRING DestinationString,
_In_ PCUNICODE_STRING SourceString,
_In_ BOOLEAN AllocateDestinationString
);
NTSYSAPI
NTSTATUS

View file

@ -1784,14 +1784,18 @@ RtlHashUnicodeString(
*
* NOTES
* Same as RtlUnicodeStringToOemString but doesn't write terminating null
* Does a partial copy if the dest buffer is too small
*/
_IRQL_requires_max_(PASSIVE_LEVEL)
_Must_inspect_result_
NTSYSAPI
NTSTATUS
NTAPI
RtlUnicodeStringToCountedOemString(
IN OUT POEM_STRING OemDest,
IN PCUNICODE_STRING UniSource,
IN BOOLEAN AllocateDestinationString)
_When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
_When_(!AllocateDestinationString, _Inout_)
POEM_STRING OemDest,
_In_ PCUNICODE_STRING UniSource,
_In_ BOOLEAN AllocateDestinationString)
{
NTSTATUS Status;
ULONG Length;