Author: tfaber
Date: Sun Jul 3 08:22:43 2016
New Revision: 71769
URL:
http://svn.reactos.org/svn/reactos?rev=71769&view=rev
Log:
[NTOS:OB]
- Use SEH to access the link target buffer in NtQuerySymbolicLinkObject
CORE-11509
Modified:
trunk/reactos/ntoskrnl/ob/oblink.c
Modified: trunk/reactos/ntoskrnl/ob/oblink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblink.c?rev=7…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/oblink.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/oblink.c [iso-8859-1] Sun Jul 3 08:22:43 2016
@@ -603,9 +603,18 @@
}
/* Copy it */
- RtlCopyMemory(SymbolicLink->LinkTarget.Buffer,
- CapturedLinkTarget.Buffer,
- CapturedLinkTarget.MaximumLength);
+ _SEH2_TRY
+ {
+ RtlCopyMemory(SymbolicLink->LinkTarget.Buffer,
+ CapturedLinkTarget.Buffer,
+ CapturedLinkTarget.MaximumLength);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ObDereferenceObject(SymbolicLink);
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
/* Initialize the remaining name, dos drive index and target object */
SymbolicLink->LinkTargetObject = NULL;