From: Thomas Bluemel Date: Thu, 27 Oct 2005 23:48:22 +0000 (+0000) Subject: Fixed ProbeForRead* macros: make sure the data always is read while probing it X-Git-Tag: backups/ros-branch-0_2_9@19949~1067 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=4a3213bf1a87aeb8dff6859b0bf00396d9e2876b;hp=7c0b5680c176f0d0fc2a6dc96c0543bc7fb874d8;ds=sidebyside Fixed ProbeForRead* macros: make sure the data always is read while probing it svn path=/trunk/; revision=18817 --- diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/reactos/ntoskrnl/include/internal/ntoskrnl.h index 140a4164a40..64917b51d51 100644 --- a/reactos/ntoskrnl/include/internal/ntoskrnl.h +++ b/reactos/ntoskrnl/include/internal/ntoskrnl.h @@ -134,7 +134,6 @@ ProbeAndCaptureUnicodeString(OUT PUNICODE_STRING Dest, else { /* sanitize structure */ - Dest->Length = 0; Dest->MaximumLength = 0; Dest->Buffer = NULL; } @@ -209,7 +208,7 @@ ReleaseCapturedUnicodeString(IN PUNICODE_STRING CapturedString, (((ULONG_PTR)(Ptr) + sizeof(Type) - 1 < (ULONG_PTR)(Ptr) || \ (ULONG_PTR)(Ptr) + sizeof(Type) - 1 >= (ULONG_PTR)MmUserProbeAddress) ? \ ExRaiseStatus (STATUS_ACCESS_VIOLATION), Default : \ - *(Type *)(Ptr)) + *(volatile Type *)(Ptr)) #define ProbeForReadBoolean(Ptr) ProbeForReadGenericType(Ptr, BOOLEAN, FALSE) #define ProbeForReadUchar(Ptr) ProbeForReadGenericType(Ptr, UCHAR, 0)