diff options
author | Volker Lendecke <vl@samba.org> | 2013-08-18 19:34:35 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-08-19 11:08:15 +1200 |
commit | f82daa054ad95c6b1ae5cfce1efb6dc461389bc9 (patch) | |
tree | 69043e6c08188b790181f822ec93d4787ebe6772 | |
parent | 817e0ae6875676c8d46b63539fe805ba215d2d6b (diff) | |
download | samba-f82daa054ad95c6b1ae5cfce1efb6dc461389bc9.tar.gz samba-f82daa054ad95c6b1ae5cfce1efb6dc461389bc9.tar.bz2 samba-f82daa054ad95c6b1ae5cfce1efb6dc461389bc9.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>
-rw-r--r-- | source4/lib/registry/local.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |