s3:tldap: simplify read_ldap_more() by using asn1_peek_full_tag()
authorStefan Metzmacher <metze@samba.org>
Fri, 26 Jan 2024 13:19:12 +0000 (14:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Feb 2024 19:29:25 +0000 (20:29 +0100)
commit223359fb71cab6319e7b8679605b0e15470ad7ec
treefa30993847a998a84f8ee2d7217737adae394529
parent49bf43a55182ee5f6a41b06a59ecbf1332f81cdc
s3:tldap: simplify read_ldap_more() by using asn1_peek_full_tag()

An LDAP pdu is at least 7 bytes long, so we read at least 7 bytes,
then it's easy to use asn1_peek_full_tag() in order to find out the
whole length of the pdu on one go.

As a side effect it's now possible that wireshark can reassemble
the fragments in a socket_wrapper generated pcap file.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/lib/tldap.c