summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-08-18 19:34:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2013-08-19 11:15:20 +1200
commit2055ce1dbe94a7f02497e72652a58736ff1cf2e0 (patch)
treed6d676b6583d75c959d3fca197f8ab4707ce4b47 /source4
parentcc983c9a6a92f3d127ec6461b15aed3fa90e6d30 (diff)
downloadsamba-2055ce1dbe94a7f02497e72652a58736ff1cf2e0.tar.gz
samba-2055ce1dbe94a7f02497e72652a58736ff1cf2e0.tar.bz2
samba-2055ce1dbe94a7f02497e72652a58736ff1cf2e0.zip
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 <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/local.c2
1 files changed, 1 insertions, 1 deletions
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,