diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-10-20 14:27:57 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-10-20 04:13:44 +0000 |
commit | 4a8c17a41cd8412247741afbcd8abad77b2a8113 (patch) | |
tree | 23a9d4678161ea5fc0f5cf437d162ab6a5a63d07 /libcli | |
parent | 39932f21dabbd96b6a1e7165d9289069cac87a3e (diff) | |
download | samba-4a8c17a41cd8412247741afbcd8abad77b2a8113.tar.gz samba-4a8c17a41cd8412247741afbcd8abad77b2a8113.tar.bz2 samba-4a8c17a41cd8412247741afbcd8abad77b2a8113.zip |
libcli/ldap Don't try and encode a control with a NULL OID
ctrl->oid is set to NULL by the Samba4 rootDSE module when removing
controls that should not be exposed over LDAP (to avoid a realloc).
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Oct 20 04:13:44 UTC 2010 on sn-devel-104
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/ldap/ldap_message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c index b9f9dff223..7756e731b2 100644 --- a/libcli/ldap/ldap_message.c +++ b/libcli/ldap/ldap_message.c @@ -167,6 +167,12 @@ static bool ldap_encode_control(void *mem_ctx, struct asn1_data *data, } for (i = 0; handlers[i].oid != NULL; i++) { + if (!ctrl->oid) { + /* not encoding this control, the OID has been + * set to NULL indicating it isn't really + * here */ + return true; + } if (strcmp(handlers[i].oid, ctrl->oid) == 0) { if (!handlers[i].encode) { if (ctrl->critical) { |