Author: greatlrd
Date: Thu Mar 6 00:01:21 2008
New Revision: 32574
URL:
http://svn.reactos.org/svn/reactos?rev=3D32574&view=3Drev
Log:
Better check for MmSecureVirtualMemory
Modified:
trunk/reactos/ntoskrnl/mm/virtual.c
Modified: trunk/reactos/ntoskrnl/mm/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c=
?rev=3D32574&r1=3D32573&r2=3D32574&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/ntoskrnl/mm/virtual.c (original)
+++ trunk/reactos/ntoskrnl/mm/virtual.c Thu Mar 6 00:01:21 2008
@@ -962,11 +962,11 @@
SIZE_T Length,
ULONG Mode)
{
- /* Only works for user space */
- if (MmHighestUserAddress < Address)
- {
+ if ( ( Address + Length) > MmHighestUserAddress) || =
+ (Address + Length <=3D Address ) )
+ {
return NULL;
- }
+ }
=
UNIMPLEMENTED;
=