From 2055ce1dbe94a7f02497e72652a58736ff1cf2e0 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/registry') diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c index 4db8cc63ce..2afb65c7d5 100644 --- a/source4/lib/registry/local.c +++ b/source4/lib/registry/local.c @@ -124,7 +124,7 @@ static WERROR local_open_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