lib: Use asn1_has_nesting
authorVolker Lendecke <vl@samba.org>
Mon, 4 Jan 2016 09:24:01 +0000 (10:24 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 23:54:18 +0000 (00:54 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/ldap/ldap_message.c

index 4518b30361dd8eec7c5dd617d49079dc4687f35b..76d2ee95c94fd969faa947a5c4b85c97d393bfe0 100644 (file)
@@ -1625,7 +1625,7 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
        }
 
        if (!asn1_end_tag(data)) goto prot_err;
-       if (asn1_has_error(data) || (data->nesting != NULL)) {
+       if (asn1_has_error(data) || asn1_has_nesting(data)) {
                return NT_STATUS_LDAP(LDAP_PROTOCOL_ERROR);
        }
        return NT_STATUS_OK;