From f82daa054ad95c6b1ae5cfce1efb6dc461389bc9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Aug 2013 19:34:35 +0000 Subject: registry4: Fix CID 1034911 Dereference before null check curbegin is always != NULL here (curend + 1) and is dereferenced by strchr. Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett --- source4/lib/registry/local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c index 79c398b68a..4db8cc63ce 100644 --- a/source4/lib/registry/local.c +++ b/source4/lib/registry/local.c @@ -233,7 +233,7 @@ static WERROR local_create_key(TALLOC_CTX *mem_ctx, break; curbegin = curend + 1; curend = strchr(curbegin, '\\'); - } while (curbegin != NULL && curbegin[0] != '\0'); + } while (curbegin[0] != '\0'); talloc_free(orig); *result = reg_import_hive_key(local_parent->global.context, curkey, -- cgit