mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- Don't cache a value if we might dereference NULL
- Fix for CID 653 svn path=/trunk/; revision=37848
This commit is contained in:
parent
529ad41347
commit
54e241e287
1 changed files with 3 additions and 2 deletions
|
@ -465,13 +465,14 @@ RtlNextUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
|
|||
BOOLEAN Restart)
|
||||
{
|
||||
PRTL_SPLAY_LINKS SplayLinks;
|
||||
PUNICODE_PREFIX_TABLE_ENTRY Entry, CaseMatchEntry;
|
||||
PUNICODE_PREFIX_TABLE_ENTRY Entry, CaseMatchEntry = NULL;
|
||||
|
||||
DPRINT("RtlNextUnicodePrefix(): Table %p Restart %b\n",
|
||||
PrefixTable, Restart);
|
||||
|
||||
/* We might need this entry 2/3rd of the time, so cache it now */
|
||||
CaseMatchEntry = PrefixTable->LastNextEntry->CaseMatch;
|
||||
if (PrefixTable->LastNextEntry)
|
||||
CaseMatchEntry = PrefixTable->LastNextEntry->CaseMatch;
|
||||
|
||||
/* Check if this is a restart or if we don't have a last entry */
|
||||
if ((Restart) || !(PrefixTable->LastNextEntry))
|
||||
|
|
Loading…
Reference in a new issue