From 074f4cec877270042cbfe3cb1e84b44918f77893 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 15 Dec 2010 20:12:03 +0000 Subject: [PATCH] [NTOS] - Roel Messiant: Fix NtQueryObject to return the required buffer size if the buffer provided was too small. Unimplemented paths behaviour is preserved. svn path=/trunk/; revision=50032 --- reactos/ntoskrnl/ob/oblife.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 7304321d411..f87e5948d36 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -1549,6 +1549,7 @@ NtQueryObject(IN HANDLE ObjectHandle, /* Information about all types */ case ObjectTypesInformation: DPRINT1("NOT IMPLEMENTED!\n"); + InfoLength = Length; Status = STATUS_NOT_IMPLEMENTED; break; @@ -1580,6 +1581,7 @@ NtQueryObject(IN HANDLE ObjectHandle, default: /* Fail it */ + InfoLength = Length; Status = STATUS_INVALID_INFO_CLASS; break; } @@ -1588,7 +1590,7 @@ NtQueryObject(IN HANDLE ObjectHandle, if (ResultLength) { /* Write the length */ - *ResultLength = Length; + *ResultLength = InfoLength; } } _SEH2_EXCEPT(ExSystemExceptionFilter())