1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3:registry: don't directly access key->subkeys->subkeys[] in reg_backend_db.c

Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael
This commit is contained in:
Michael Adam 2009-02-24 22:16:40 +01:00
parent 8c1e4034fe
commit 63b576424d

View File

@ -648,8 +648,10 @@ bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr)
(num_subkeys == old_num_subkeys)) {
for (i = 0; i < num_subkeys; i++) {
if (strcmp(ctr->subkeys[i],
old_subkeys->subkeys[i]) != 0) {
if (strcmp(regsubkey_ctr_specific_key(ctr, i),
regsubkey_ctr_specific_key(old_subkeys, i))
!= 0)
{
break;
}
}
@ -967,7 +969,7 @@ static bool create_sorted_subkeys(const char *key, const char *sorted_keyname)
for (i = 0; i < num_subkeys; i++) {
sorted_subkeys[i] = talloc_strdup_upper(sorted_subkeys,
ctr->subkeys[i]);
regsubkey_ctr_specific_key(ctr, i));
if (sorted_subkeys[i] == NULL) {
goto fail;
}