[RTL]
[reactos.git] / reactos / lib / rtl / registry.c
index 434946f..79230a1 100644 (file)
@@ -10,6 +10,8 @@
 /* INCLUDES *****************************************************************/
 
 #include <rtl.h>
+#include <suppress.h>
+
 #define NDEBUG
 #include <debug.h>
 
@@ -242,6 +244,7 @@ RtlpCallQueryRegistryRoutine(IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
         {
             /* Prepare defaults */
             Status = STATUS_SUCCESS;
+            _PRAGMA_WARNING_SUPPRESS(__WARNING_SIZEOF_COUNTOF_MISMATCH)
             ValueEnd = (PWSTR)((ULONG_PTR)Data + Length) - sizeof(UNICODE_NULL);
             p = Data;
 
@@ -834,7 +837,7 @@ RtlpNtEnumerateSubKey(IN HANDLE KeyHandle,
                             KeyInfo,
                             BufferLength,
                             &ReturnedLength);
-    if (NT_SUCCESS(Status))
+    if (NT_SUCCESS(Status) && (KeyInfo != NULL))
     {
         /* Check if the name fits */
         if (KeyInfo->NameLength <= SubKeyName->MaximumLength)