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
}
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) {