summaryrefslogtreecommitdiff
path: root/libcli/ldap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2020-06-23 19:09:28 +0200
committerVolker Lendecke <vl@samba.org>2020-07-09 20:16:40 +0000
commit0bb1488d315e93162eae433f869c1ddabea722c0 (patch)
treebaf555e7faf03b07bbe95b4038556b226e29d341 /libcli/ldap
parent60b0928945c9be3785b5e2855b066f9f97beb2df (diff)
downloadsamba-0bb1488d315e93162eae433f869c1ddabea722c0.tar.gz
libcli/ldap: Fix decoding struct ldap_ExtendedResponse
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli/ldap')
-rw-r--r--libcli/ldap/ldap_message.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c
index 69a48279532..c7d86844963 100644
--- a/libcli/ldap/ldap_message.c
+++ b/libcli/ldap/ldap_message.c
@@ -1540,7 +1540,8 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
if (!ldap_decode_response(msg, data, &r->response)) goto prot_err;
if (asn1_peek_tag(data, ASN1_CONTEXT_SIMPLE(10))) {
- if (!asn1_read_ContextSimple(data, msg, 1, &tmp_blob)) goto prot_err;
+ if (!asn1_read_ContextSimple(data, msg, 10, &tmp_blob))
+ goto prot_err;
r->oid = blob2string_talloc(msg, tmp_blob);
data_blob_free(&tmp_blob);
if (!r->oid) {
@@ -1551,7 +1552,8 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
}
if (asn1_peek_tag(data, ASN1_CONTEXT_SIMPLE(11))) {
- if (!asn1_read_ContextSimple(data, msg, 1, &tmp_blob)) goto prot_err;
+ if (!asn1_read_ContextSimple(data, msg, 11, &tmp_blob))
+ goto prot_err;
r->value = talloc(msg, DATA_BLOB);
if (!r->value) {
return NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);