diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2010-10-01 16:38:04 -0600 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2010-10-01 17:01:57 -0600 |
| commit | 4f410d762b008da8e2e43e29100c2c04ff332fbb (patch) | |
| tree | 6723ef832b034bda64cc691d252b42e522718bfa /ldap/servers/plugins/chainingdb | |
| parent | a82f61269d69882d19b15def70de68906ed5740e (diff) | |
| download | ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.tar.gz ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.tar.xz ds-4f410d762b008da8e2e43e29100c2c04ff332fbb.zip | |
openldap ber_init will assert if the bv->bv_val is NULL
Have to ensure that all usage of ber_init in the server checks to see if
the bv->bv_val is non-NULL before using ber_init, and return the appropriate
error if it is NULL
Also fixed a problem in dna_extend_exop - would not send the ldap result to
the client in certain error conditions
Reviewed by: nhosoi (Thanks!)
Tested on: RHEL5 x86_64
Diffstat (limited to 'ldap/servers/plugins/chainingdb')
| -rw-r--r-- | ldap/servers/plugins/chainingdb/cb_controls.c | 3 | ||||
| -rw-r--r-- | ldap/servers/plugins/chainingdb/cb_utils.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ldap/servers/plugins/chainingdb/cb_controls.c b/ldap/servers/plugins/chainingdb/cb_controls.c index f6b0653a..8416c0a5 100644 --- a/ldap/servers/plugins/chainingdb/cb_controls.c +++ b/ldap/servers/plugins/chainingdb/cb_controls.c @@ -221,7 +221,8 @@ int cb_update_controls( Slapi_PBlock * pb, dCount++; } else - if (!strcmp(reqControls[cCount]->ldctl_oid,CB_LDAP_CONTROL_CHAIN_SERVER)) { + if (!strcmp(reqControls[cCount]->ldctl_oid,CB_LDAP_CONTROL_CHAIN_SERVER) && + reqControls[cCount]->ldctl_value.bv_val) { /* Max hop count reached ? */ /* Checked earlier by a call to cb_forward_operation() */ diff --git a/ldap/servers/plugins/chainingdb/cb_utils.c b/ldap/servers/plugins/chainingdb/cb_utils.c index 4878e1a8..cfa19a16 100644 --- a/ldap/servers/plugins/chainingdb/cb_utils.c +++ b/ldap/servers/plugins/chainingdb/cb_utils.c @@ -147,7 +147,8 @@ int cb_forward_operation(Slapi_PBlock * pb ) { struct berval *ctl_value=NULL; int iscritical=0; - if (slapi_control_present(ctrls,CB_LDAP_CONTROL_CHAIN_SERVER,&ctl_value,&iscritical)) { + if (slapi_control_present(ctrls,CB_LDAP_CONTROL_CHAIN_SERVER,&ctl_value,&iscritical) && + ctl_value && ctl_value->bv_val) { /* Decode control data */ /* hop INTEGER (0 .. maxInt) */ |
