libcli/ldap: let ldap_full_packet() use asn1_peek_tag_needed_size()
authorStefan Metzmacher <metze@samba.org>
Fri, 24 Sep 2010 03:09:15 +0000 (05:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Sun, 26 Sep 2010 04:45:40 +0000 (06:45 +0200)
This allows us to read a full packet without read byte after byte
or possible read to much.

metze

libcli/ldap/ldap_message.c

index 1e4421442ca832324a6e2dd763294e8a97c6c9c7..394151879c99e2d65f3ce73d684f32b9c80788c9 100644 (file)
@@ -1609,5 +1609,5 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
 */
 NTSTATUS ldap_full_packet(void *private_data, DATA_BLOB blob, size_t *packet_size)
 {
-       return asn1_full_tag(blob, ASN1_SEQUENCE(0), packet_size);
+       return asn1_peek_full_tag(blob, ASN1_SEQUENCE(0), packet_size);
 }