diff options
author | Rich Megginson <rmeggins@redhat.com> | 2005-08-25 21:49:47 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2005-08-25 21:49:47 +0000 |
commit | 2b9d9f700b4f26ed273f90c1594954fbf60038a3 (patch) | |
tree | db545516244dd8117d254c8bc689434b396ceeb1 | |
parent | cad76b5f2a5db241a647e777e929efff2467c98a (diff) | |
download | ds-2b9d9f700b4f26ed273f90c1594954fbf60038a3.tar.gz ds-2b9d9f700b4f26ed273f90c1594954fbf60038a3.tar.xz ds-2b9d9f700b4f26ed273f90c1594954fbf60038a3.zip |
Bug(s) fixed: 165600
Bug Description: Adding multiple attributes using a single ldapmodify crashes ns-slapd
Branch: Directory71RtmBranch
Reviewed by: Nathan (Thanks!)
Fix Description: In C, the array '[]' dereference operator takes precedence over the '*' deref operator. In this case, I needed to put parentheses around the pointer dereference to avoid having array dereferenced first. modary is a pointer to an array, not an array, so I can't dereference it with the array operator until I first dereference the pointer.
Platforms tested: RHEL3
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
-rw-r--r-- | ldap/servers/plugins/uiduniq/7bit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/plugins/uiduniq/7bit.c b/ldap/servers/plugins/uiduniq/7bit.c index cfea16fd..fb340fa3 100644 --- a/ldap/servers/plugins/uiduniq/7bit.c +++ b/ldap/servers/plugins/uiduniq/7bit.c @@ -344,7 +344,7 @@ addMod(LDAPMod ***modary, int *capacity, int *nmods, LDAPMod *toadd) *modary = (LDAPMod **)slapi_ch_malloc(*capacity * sizeof(LDAPMod *)); } } - *modary[*nmods] = toadd; + (*modary)[*nmods] = toadd; (*nmods)++; } |