summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-09-07 13:15:49 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-09-07 16:03:03 -0400
commitc2160564b280be4c44453e04f62220b97504fc91 (patch)
tree0f91645e3750f0dce53465249830eb1398df306f /src
parent64caba9e680b72f6d7c174cb86275720389850d6 (diff)
downloadsssd-c2160564b280be4c44453e04f62220b97504fc91.tar.gz
sssd-c2160564b280be4c44453e04f62220b97504fc91.tar.xz
sssd-c2160564b280be4c44453e04f62220b97504fc91.zip
Do not access memory out of bounds
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_hbac_hosts.c4
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 70be90e10..31e96e546 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;