diff options
author | Sumit Bose <sbose@redhat.com> | 2011-09-07 13:15:49 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-26 10:29:39 -0400 |
commit | c65cf9b9a77df7f274694cd44c914dc7691125c2 (patch) | |
tree | 25d0faef9936ec4cf3512f321beb8f69148af942 /src | |
parent | e97b2822ad260a1df04e9b5b26b93ea0fa1b9853 (diff) | |
download | sssd-c65cf9b9a77df7f274694cd44c914dc7691125c2.tar.gz sssd-c65cf9b9a77df7f274694cd44c914dc7691125c2.tar.xz sssd-c65cf9b9a77df7f274694cd44c914dc7691125c2.zip |
Do not access memory out of bounds
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/ipa/ipa_hbac_hosts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_hbac_hosts.c b/src/providers/ipa/ipa_hbac_hosts.c index dd82f2848..4aea8608f 100644 --- a/src/providers/ipa/ipa_hbac_hosts.c +++ b/src/providers/ipa/ipa_hbac_hosts.c @@ -499,10 +499,10 @@ hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx, goto done; } - for (idx = host_count; idx <= host_count + el->num_values; idx++) { + for (idx = host_count; idx < host_count + el->num_values; idx++) { shosts->names[idx] = talloc_strdup(shosts->names, - (const char *)el->values[idx].data); + (const char *)el->values[idx - host_count].data); if (shosts->names[idx] == NULL) { ret = ENOMEM; goto done; |