git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
817e0ae
)
registry4: Fix CID 1034911 Dereference before null check
author
Volker Lendecke
<vl@samba.org>
Sun, 18 Aug 2013 19:34:35 +0000
(19:34 +0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Sun, 18 Aug 2013 23:08:15 +0000
(11:08 +1200)
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>
source4/lib/registry/local.c
patch
|
blob
|
history
diff --git
a/source4/lib/registry/local.c
b/source4/lib/registry/local.c
index 79c398b68a90f7352e309df77abd533a5586fdfe..4db8cc63ce0c475bc77cddb5c3427dfe0395dcdd 100644
(file)
--- 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,