From 4e05717559a2649288ac0a9e5df4cdf1543aa559 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 9 May 2012 10:41:06 +0200 Subject: [PATCH] s3: Fix Coverity ID 242754 Dereference null return value --- source3/utils/eventlogadm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c index 8d8fa4a4d74..b54353613cb 100644 --- a/source3/utils/eventlogadm.c +++ b/source3/utils/eventlogadm.c @@ -121,7 +121,7 @@ static bool eventlog_add_source( const char *eventlog, const char *sourcename, goto done; } - relpath = strchr(evtlogpath, '\\'); + relpath = evtlogpath + sizeof(KEY_EVENTLOG); hive_name = talloc_strndup(ctx, evtlogpath, relpath - evtlogpath); if (!hive_name) { d_printf("Out of memory\n"); -- 2.11.4.GIT