Author: cgutman
Date: Wed Apr 28 22:06:28 2010
New Revision: 47056
URL:
http://svn.reactos.org/svn/reactos?rev=47056&view=rev
Log:
[NTOSKRNL]
- Fix length calculation of symbolic links with reference strings attached
- Fixes opening registry keys for symbolic links with reference strings (such as audio
devices)
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] Wed Apr 28 22:06:28 2010
@@ -127,7 +127,7 @@
{
ReferenceString.Buffer[0] = L'#';
- SubKeyName.Length = ReferenceString.Buffer - SubKeyName.Buffer;
+ SubKeyName.Length = (USHORT)((ULONG_PTR)(ReferenceString.Buffer) -
(ULONG_PTR)SubKeyName.Buffer);
ReferenceString.Length = SymbolicLinkName->Length - SubKeyName.Length;
}
else