Fixed ProbeForRead* macros: make sure the data always is read while
probing it
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
_____
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h 2005-10-27
23:31:14 UTC (rev 18816)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h 2005-10-27
23:48:22 UTC (rev 18817)
@@ -134,7 +134,6 @@
else
{
/* sanitize structure */
- Dest->Length = 0;
Dest->MaximumLength = 0;
Dest->Buffer = NULL;
}
@@ -209,7 +208,7 @@
(((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)
Show replies by date