mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Fix a bug spotted in RtlInsertUnicodePrefix's loop.
svn path=/trunk/; revision=19052
This commit is contained in:
parent
d2a199261e
commit
ac2e8c3bcd
1 changed files with 5 additions and 13 deletions
|
@ -167,18 +167,7 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
|
||||||
/* Get the splay links and loop */
|
/* Get the splay links and loop */
|
||||||
while ((SplayLinks = &CurrentEntry->Links))
|
while ((SplayLinks = &CurrentEntry->Links))
|
||||||
{
|
{
|
||||||
/*
|
/* Get the entry */
|
||||||
* Implementation notes:
|
|
||||||
* - get the entry
|
|
||||||
* - compare the entry's prefix with the fullname:
|
|
||||||
* if greater: restart on the left child
|
|
||||||
* if lesser: restart on the right child
|
|
||||||
* - else if equal:
|
|
||||||
* for caseinsensitive, just return the entry and
|
|
||||||
* splay it and set it as root if it's a child
|
|
||||||
* for casesensitive, loop the circular case match list and
|
|
||||||
* keep comparing for each entry
|
|
||||||
*/
|
|
||||||
Entry = CONTAINING_RECORD(SplayLinks,
|
Entry = CONTAINING_RECORD(SplayLinks,
|
||||||
UNICODE_PREFIX_TABLE_ENTRY,
|
UNICODE_PREFIX_TABLE_ENTRY,
|
||||||
Links);
|
Links);
|
||||||
|
@ -374,8 +363,11 @@ RtlInsertUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
|
||||||
/* Insert it into the circular list */
|
/* Insert it into the circular list */
|
||||||
PrefixTableEntry->CaseMatch = Entry->CaseMatch;
|
PrefixTableEntry->CaseMatch = Entry->CaseMatch;
|
||||||
Entry->CaseMatch = PrefixTableEntry;
|
Entry->CaseMatch = PrefixTableEntry;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (Result == GenericGreaterThan)
|
|
||||||
|
/* Check if the result was greater or lesser than */
|
||||||
|
if (Result == GenericGreaterThan)
|
||||||
{
|
{
|
||||||
/* Check out if we have a left child */
|
/* Check out if we have a left child */
|
||||||
if (RtlLeftChild(&Entry->Links))
|
if (RtlLeftChild(&Entry->Links))
|
||||||
|
|
Loading…
Reference in a new issue