https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8e7b22a631d8602dc7c61…
commit 8e7b22a631d8602dc7c6167ec33cb7938e210bf6
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Sat Apr 22 17:18:57 2023 +0200
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Sat Apr 22 17:18:57 2023 +0200
[NTOS:OB] Fix the SAL2 annotation of ObQueryTypeInfo
The data has to be written into ObjectTypeInfo based on the return length,
not only what is provided by the input buffer length. Fix suggested by
Hermès.
---
ntoskrnl/ob/oblife.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c
index f0ae6aafee3..10f010cea49 100644
--- a/ntoskrnl/ob/oblife.c
+++ b/ntoskrnl/ob/oblife.c
@@ -946,7 +946,8 @@ NTSTATUS
NTAPI
ObQueryTypeInfo(
_In_ POBJECT_TYPE ObjectType,
- _Out_writes_bytes_(Length) POBJECT_TYPE_INFORMATION ObjectTypeInfo,
+ _Out_writes_bytes_to_(Length, *ReturnLength)
+ POBJECT_TYPE_INFORMATION ObjectTypeInfo,
_In_ ULONG Length,
_Out_ PULONG ReturnLength)
{