Author: dgorbachev
Date: Fri Nov 29 22:34:43 2013
New Revision: 61148
URL:
http://svn.reactos.org/svn/reactos?rev=61148&view=rev
Log:
[NTOSKRNL]
Fix undefined behavior issue.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/deviface.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/deviface…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1] Fri Nov 29 22:34:43 2013
@@ -747,9 +747,11 @@
Status = STATUS_INSUFFICIENT_RESOURCES;
goto cleanup;
}
- RtlCopyMemory(NewBuffer, ReturnBuffer.Buffer, ReturnBuffer.Length);
if (ReturnBuffer.Buffer)
+ {
+ RtlCopyMemory(NewBuffer, ReturnBuffer.Buffer, ReturnBuffer.Length);
ExFreePool(ReturnBuffer.Buffer);
+ }
ReturnBuffer.Buffer = NewBuffer;
}
DPRINT("Adding symbolic link %wZ\n", &KeyName);