summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_eventlog.c4
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index d0da12637a..b70b79f1e3 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -194,6 +194,10 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
int i;
int numsources;
+ if (!elogs) {
+ return False;
+ }
+
for ( i = 0; elogs[i]; i++ ) {
if ( strequal( elogs[i], eventlog ) )
break;
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 85990055dd..c8be6a9b34 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -123,6 +123,10 @@ static BOOL elog_validate_logname( const char *name )
int i;
const char **elogs = lp_eventlog_list();
+ if (!elogs) {
+ return False;
+ }
+
for ( i=0; elogs[i]; i++ ) {
if ( strequal( name, elogs[i] ) )
return True;