Author: dgorbachev
Date: Mon Nov 18 22:00:12 2013
New Revision: 61045
URL:
http://svn.reactos.org/svn/reactos?rev=61045&view=rev
Log:
[NTOSKRNL]
Do not call RtlCopyMemory (i.e. memcpy/memmove) with NULL pointer, which
gives undefined behavior.
Modified:
trunk/reactos/ntoskrnl/ex/resource.c
Modified: trunk/reactos/ntoskrnl/ex/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] Mon Nov 18 22:00:12 2013
@@ -361,7 +361,7 @@
else
{
/* Copy the table */
- RtlCopyMemory(Table, Owner, OldSize * sizeof(OWNER_ENTRY));
+ if (Owner) RtlCopyMemory(Table, Owner, OldSize * sizeof(OWNER_ENTRY));
/* Acquire dispatcher lock to prevent thread boosting */
OldIrql = KiAcquireDispatcherLock();