From 0daaf9da75346d91f2d36eaecec52f81d639d217 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 10 Sep 2010 21:13:06 +0000 Subject: [PATCH] [NTOS] - Fix a code typo which led to a security issue when the XOR algorithm for the system cookie might actually yield zero. Now it's going to loop as long as the cookie is 0, attempting to generate a non-zero one. svn path=/trunk/; revision=48737 --- reactos/ntoskrnl/ps/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index d05fc8570a8..38459a32794 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -91,7 +91,7 @@ PspUserThreadStartup(IN PKSTART_ROUTINE StartRoutine, } /* Do we have a cookie set yet? */ - if (!SharedUserData->Cookie) + while (!SharedUserData->Cookie) { LARGE_INTEGER SystemTime; ULONG NewCookie;