diff options
author | Michael Adam <obnox@samba.org> | 2009-02-24 21:12:26 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-02-26 13:22:51 +0100 |
commit | 8c1e4034fe2ac956cec3854586d3d2fcec268697 (patch) | |
tree | fc78348f1782cd7eb8a520631dc7f083292d939e | |
parent | 62b53507d29b0679647f429c8d969167fe25122f (diff) | |
download | samba-8c1e4034fe2ac956cec3854586d3d2fcec268697.tar.gz samba-8c1e4034fe2ac956cec3854586d3d2fcec268697.tar.bz2 samba-8c1e4034fe2ac956cec3854586d3d2fcec268697.zip |
s3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c
Use the reg_objects accessor regsubkey_ctr_specific_key() instead.
Michael
-rw-r--r-- | source3/registry/reg_api.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 06796a7fd0..6e0e342dba 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -312,7 +312,9 @@ WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key, return WERR_NO_MORE_ITEMS; } - if (!(*name = talloc_strdup(mem_ctx, key->subkeys->subkeys[idx]))) { + if (!(*name = talloc_strdup(mem_ctx, + regsubkey_ctr_specific_key(key->subkeys, idx)))) + { return WERR_NOMEM; } @@ -407,7 +409,8 @@ WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys, max_len = 0; for (i=0; i< regsubkey_ctr_numkeys(key->subkeys); i++) { - max_len = MAX(max_len, strlen(key->subkeys->subkeys[i])); + max_len = MAX(max_len, + strlen(regsubkey_ctr_specific_key(key->subkeys, i))); } *num_subkeys = regsubkey_ctr_numkeys(key->subkeys); |