https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6df3c622e0a868296513939047f539f16e1573e

commit b6df3c622e0a868296513939047f539f16e1573e
Author:     Thomas Faber <[email protected]>
AuthorDate: Sun Dec 29 10:33:38 2019 +0100
Commit:     Thomas Faber <[email protected]>
CommitDate: Sun Dec 29 10:41:47 2019 +0100

    [NTOS:CM] Probe for write in NtLockProductActivationKeys.
    
    This doesn't technically make a difference, but it's good practice.
---
 ntoskrnl/config/ntapi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ntoskrnl/config/ntapi.c b/ntoskrnl/config/ntapi.c
index bfe9ffe132f..b672a9bc889 100644
--- a/ntoskrnl/config/ntapi.c
+++ b/ntoskrnl/config/ntapi.c
@@ -1395,7 +1395,7 @@ NtLockProductActivationKeys(IN PULONG pPrivateVer,
             /* For user mode, probe it */
             if (PreviousMode != KernelMode)
             {
-                ProbeForRead(pPrivateVer, sizeof(ULONG), sizeof(ULONG));
+                ProbeForWriteUlong(pPrivateVer);
             }
 
             /* Return the expected version */
@@ -1408,7 +1408,7 @@ NtLockProductActivationKeys(IN PULONG pPrivateVer,
             /* For user mode, probe it */
             if (PreviousMode != KernelMode)
             {
-                ProbeForRead(pSafeMode, sizeof(ULONG), sizeof(ULONG));
+                ProbeForWriteUlong(pSafeMode);
             }
 
             /* Return the safe boot mode state */

Reply via email to