[EVENTLOG]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Fri, 31 Oct 2014 22:39:19 +0000 (22:39 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Fri, 31 Oct 2014 22:39:19 +0000 (22:39 +0000)
- fix a possible null dereference

svn path=/trunk/; revision=65162

reactos/base/services/eventlog/rpc.c

index 99f8d72..403e827 100644 (file)
@@ -118,6 +118,14 @@ ElfCreateEventLogHandle(PLOGHANDLE *LogHandle,
         if (lpLogHandle->LogFile == NULL)
         {
             lpLogHandle->LogFile = LogfListItemByName(L"Application");
+
+            if (lpLogHandle->LogFile == NULL)
+            {
+                DPRINT1("Application log is missing!\n");
+                Status = STATUS_UNSUCCESSFUL;
+                goto Done;
+            }
+
             lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile);
         }
     }