diff options
-rw-r--r-- | source/registry/reg_eventlog.c | 4 | ||||
-rw-r--r-- | source/rpc_server/srv_eventlog_nt.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/registry/reg_eventlog.c b/source/registry/reg_eventlog.c index d0da12637a3..b70b79f1e39 100644 --- a/source/registry/reg_eventlog.c +++ b/source/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/source/rpc_server/srv_eventlog_nt.c b/source/rpc_server/srv_eventlog_nt.c index 85990055dd7..c8be6a9b346 100644 --- a/source/rpc_server/srv_eventlog_nt.c +++ b/source/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; |