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)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Apr 2024 23:50:34 +0000 (23:50 +0000)
commit30440e0ee382b996788cd6ce9f9dd7e955d9d6aa
tree25dd4fd3ee403f4024e5f8aa32df24a1d69231f3
parentca93631291051be40f211997fb6636acf52f20a3
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>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/lib/tldap.c