Author: hpoussin
Date: Fri Oct  3 15:11:31 2014
New Revision: 64501

URL: http://svn.reactos.org/svn/reactos?rev=64501&view=rev
Log:
[MKHIVE] Misc fixes:
- add missing initialization
- support trailing backslash at end of registry key name
CORE-8584 #resolve

Modified:
    trunk/reactos/tools/mkhive/registry.c

Modified: trunk/reactos/tools/mkhive/registry.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.c?rev=64501&r1=64500&r2=64501&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.c       [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.c       [iso-8859-1] Fri Oct  3 
15:11:31 2014
@@ -88,6 +88,8 @@
                free(Key);
                return NULL;
        }
+       Key->KeyCell->SubKeyLists[Stable] = HCELL_NIL;
+       Key->KeyCell->SubKeyLists[Volatile] = HCELL_NIL;
        Key->LinkedKey = NULL;
        return Key;
 }
@@ -136,7 +138,14 @@
                                (USHORT)((ULONG_PTR)End - 
(ULONG_PTR)LocalKeyName);
                }
                else
+               {
                        RtlInitUnicodeString(&KeyString, LocalKeyName);
+                       if (KeyString.Length == 0)
+                       {
+                               /* Trailing backslash char; we're done */
+                               break;
+                       }
+               }
 
                /* Redirect from 'CurrentControlSet' to 'ControlSet001' */
                if (!strncmpW(LocalKeyName, L"CurrentControlSet", 17) &&


Reply via email to