Author: khornicek
Date: Wed Feb 22 10:29:03 2017
New Revision: 73879
URL:
http://svn.reactos.org/svn/reactos?rev=73879&view=rev
Log:
[NTUSER]
- Prevent a null to be passed to UserDereferenceObject in UserSetCursorIconData. CID
1321971
- Make the status check in co_IntCallSentMessageCallback less useless. CID 1322014
- Prevent a null pointer dereference in a trace in IntCreateClass. CID 514617
Modified:
trunk/reactos/win32ss/user/ntuser/callback.c
trunk/reactos/win32ss/user/ntuser/callproc.c
trunk/reactos/win32ss/user/ntuser/class.c
trunk/reactos/win32ss/user/ntuser/cursoricon.c
Modified: trunk/reactos/win32ss/user/ntuser/callback.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/callba…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/callback.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/callback.c [iso-8859-1] Wed Feb 22 10:29:03 2017
@@ -279,6 +279,7 @@
if (!NT_SUCCESS(Status))
{
+ ERR("KeUserModeCallback failed with %lx\n", Status);
return;
}
return;
Modified: trunk/reactos/win32ss/user/ntuser/callproc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/callpr…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/callproc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/callproc.c [iso-8859-1] Wed Feb 22 10:29:03 2017
@@ -47,10 +47,10 @@
NewCallProc->pfnClientPrevious = WndProc;
NewCallProc->wType |= Unicode ? UserGetCPDA2U : UserGetCPDU2A ;
NewCallProc->spcpdNext = NULL;
+
+ /* Release the extra reference (UserCreateObject added 2 references) */
+ UserDereferenceObject(NewCallProc);
}
-
- /* Release the extra reference (UserCreateObject added 2 references) */
- if (NewCallProc != NULL) UserDereferenceObject(NewCallProc);
return NewCallProc;
}
Modified: trunk/reactos/win32ss/user/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Wed Feb 22 10:29:03 2017
@@ -1228,7 +1228,8 @@
}
TRACE("Created class 0x%p with name %wZ and proc 0x%p for atom 0x%x and version
atom 0x%x and hInstance 0x%p, global %u\n",
- Class, ClassName, Class->lpfnWndProc, Atom, verAtom, Class->hModule,
Class->Global);
+ Class, ClassName, Class ? Class->lpfnWndProc : NULL, Atom, verAtom,
+ Class ? Class->hModule : NULL , Class ? Class->Global : 0);
return Class;
}
@@ -2332,6 +2333,7 @@
if (SYSTEMCUR(ARROW) == NULL)
{
ERR("SYSTEMCUR(ARROW) == NULL, should not happen!!\n");
+ ASSERT(FALSE);
}
else
{
Modified: trunk/reactos/win32ss/user/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/cursor…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] Wed Feb 22 10:29:03 2017
@@ -1494,7 +1494,9 @@
}
/* Dereference the cursor and return the result */
- UserDereferenceObject(pcur);
+ if (pcur)
+ UserDereferenceObject(pcur);
+
return bResult;
}