Author: gschneider Date: Fri Aug 21 13:27:24 2009 New Revision: 42822
URL: http://svn.reactos.org/svn/reactos?rev=42822&view=rev Log: - co_IntLoadSysMenuTemplate: only copy buffer if prior operation succeeded, bug #4803 - co_IntLoadDefaultCursors: result is not used, no need to copy it
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callback.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] Fri Aug 21 13:27:24 2009 @@ -249,7 +249,7 @@ HMENU APIENTRY co_IntLoadSysMenuTemplate() { - LRESULT Result; + LRESULT Result = 0; NTSTATUS Status; PVOID ResultPointer; ULONG ResultLength; @@ -264,23 +264,20 @@ 0, &ResultPointer, &ResultLength); - - /* Simulate old behaviour: copy into our local buffer */ - Result = *(LRESULT*)ResultPointer; + if (NT_SUCCESS(Status)) + { + /* Simulate old behaviour: copy into our local buffer */ + Result = *(LRESULT*)ResultPointer; + }
UserEnterCo();
- if (!NT_SUCCESS(Status)) - { - return(0); - } return (HMENU)Result; }
BOOL APIENTRY co_IntLoadDefaultCursors(VOID) { - LRESULT Result; NTSTATUS Status; PVOID ResultPointer; ULONG ResultLength; @@ -296,9 +293,6 @@ sizeof(BOOL), &ResultPointer, &ResultLength); - - /* Simulate old behaviour: copy into our local buffer */ - Result = *(LRESULT*)ResultPointer;
UserEnterCo();