[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 BOOLEAN AllocateDestinationString
); );
_IRQL_requires_max_(PASSIVE_LEVEL)
_Must_inspect_result_
NTSYSAPI NTSYSAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
RtlUnicodeStringToCountedOemString( RtlUnicodeStringToCountedOemString(
_Inout_ POEM_STRING OemDest, _When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
_In_ PCUNICODE_STRING UniSource, _When_(!AllocateDestinationString, _Inout_)
_In_ BOOLEAN AllocateDestinationString); POEM_STRING DestinationString,
_In_ PCUNICODE_STRING SourceString,
_In_ BOOLEAN AllocateDestinationString
);
NTSYSAPI NTSYSAPI
NTSTATUS NTSTATUS

View file

@ -1784,14 +1784,18 @@ RtlHashUnicodeString(
* *
* NOTES * NOTES
* Same as RtlUnicodeStringToOemString but doesn't write terminating null * 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 NTSTATUS
NTAPI NTAPI
RtlUnicodeStringToCountedOemString( RtlUnicodeStringToCountedOemString(
IN OUT POEM_STRING OemDest, _When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
IN PCUNICODE_STRING UniSource, _When_(!AllocateDestinationString, _Inout_)
IN BOOLEAN AllocateDestinationString) POEM_STRING OemDest,
_In_ PCUNICODE_STRING UniSource,
_In_ BOOLEAN AllocateDestinationString)
{ {
NTSTATUS Status; NTSTATUS Status;
ULONG Length; ULONG Length;