mirror of
https://github.com/reactos/reactos.git
synced 2024-10-19 15:41:31 +00:00
Fixed ProbeForRead* macros: make sure the data always is read while probing it
svn path=/trunk/; revision=18817
This commit is contained in:
parent
7c0b5680c1
commit
4a3213bf1a
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue