Consider not initialized list as empty, what prevents page faults
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 57s
Builds / ExectOS (i686) (push) Successful in 55s

This commit is contained in:
Rafal Kupiec 2024-05-14 15:53:21 +02:00
parent 60a9e4b534
commit 01d127f49e
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -94,7 +94,7 @@ RtlInsertTailList(IN OUT PLIST_ENTRY ListHead,
}
/**
* Indicates whether a doubly linked list structure is empty.
* Indicates whether a doubly linked list structure is empty, or not initialized at all.
*
* @param ListHead
* Pointer to a structure that represents the head of the list.
@ -107,7 +107,7 @@ XTCDECL
BOOLEAN
RtlListEmpty(IN PLIST_ENTRY ListHead)
{
return (ListHead->Flink == ListHead);
return (((ListHead->Flink == NULL) && (ListHead->Blink == NULL)) || (ListHead->Flink == ListHead));
}
/**