[ros-diffs] [fireball] 32579: - Our precious kernel should be handled with love and care, with thorough check of every change going in! Not with "commit-and-forget" fashion. - MmSecureVirtualMemory fails in case of Length = 0 too.

fireball at svn.reactos.org fireball at svn.reactos.org
Sun Mar 9 12:34:17 CET 2008


Author: fireball
Date: Thu Mar  6 10:39:36 2008
New Revision: 32579

URL: http://svn.reactos.org/svn/reactos?rev=3D32579&view=3Drev
Log:
- Our precious kernel should be handled with love and care, with thorough c=
heck of every change going in! Not with "commit-and-forget" fashion.
- MmSecureVirtualMemory fails in case of Length =3D 0 too.

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=3D32579&r1=3D32578&r2=3D32579&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 10:39:36 2008
@@ -963,7 +963,7 @@
                       ULONG  Mode)
 {
     /* Only works for user space */
-    if (((ULONG_PTR)Address > (ULONG_PTR)Address + Length) ||
+    if (((ULONG_PTR)Address >=3D (ULONG_PTR)Address + Length) ||
         ((ULONG_PTR)MmHighestUserAddress < (ULONG_PTR)Address + Length))
     {
         return NULL;




More information about the Ros-diffs mailing list