From 7fff216bed1657ce39b645e9e53fb3b63ec4229f Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 8 Mar 2024 20:53:12 +0200 Subject: [PATCH] [NTOS:EX] Fix a loop bug --- ntoskrnl/inbv/inbv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index 9c51098284f..006f96a4192 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -109,8 +109,9 @@ FindBitmapResource( /* Loop the driver list */ ListHead = &LoaderBlock->LoadOrderListHead; - NextEntry = ListHead->Flink; - while (NextEntry != ListHead) + for (NextEntry = ListHead->Flink; + NextEntry != ListHead; + NextEntry = NextEntry->Flink) { /* Get the entry */ LdrEntry = CONTAINING_RECORD(NextEntry,