]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Fix Coverity ID 242754 Dereference null return value
authorVolker Lendecke <vl@samba.org>
Wed, 9 May 2012 08:41:06 +0000 (10:41 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 10 May 2012 07:11:57 +0000 (09:11 +0200)
source3/utils/eventlogadm.c

index 8d8fa4a4d74b184418ff90a545bb2560e5817b86..b54353613cb65f06d8d1e09fea09001fa25f25fd 100644 (file)
@@ -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");