diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2005-08-10 20:56:35 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2005-08-10 20:56:35 +0000 |
| commit | 2ff41576f3f4f7ae310cce9c7bf8baf60f2a8873 (patch) | |
| tree | a571298c1ee8c35e8f044300b5847efebb74d45f | |
| parent | a6e1e9a065b83791d5474a4bf9400d1dcf6c8f3f (diff) | |
| download | ds-2ff41576f3f4f7ae310cce9c7bf8baf60f2a8873.tar.gz ds-2ff41576f3f4f7ae310cce9c7bf8baf60f2a8873.tar.xz ds-2ff41576f3f4f7ae310cce9c7bf8baf60f2a8873.zip | |
Bug(s) fixed: 165600
Bug Description: Adding multiple attributes using a single ldapmodify crashes ns-slapd
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)++; } |
