From c5e4c834648fd7639d9024f15f4e4f8163340581 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 11:16:34 +0000 Subject: r3475: don't pass a ptr to an enum as a ptr to an int (bug found by tcc) (This used to be commit a7e5bde6befa8da8fc7447b295d9177126f74964) --- source4/libcli/ldap/ldap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/libcli/ldap') diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index 5224373afc..6d2cef8bdb 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -977,9 +977,11 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg) while (asn1_tag_remaining(data) > 0) { struct ldap_mod mod; + int v; ZERO_STRUCT(mod); asn1_start_tag(data, ASN1_SEQUENCE(0)); - asn1_read_enumerated(data, &mod.type); + asn1_read_enumerated(data, &v); + mod.type = v; ldap_decode_attrib(msg->mem_ctx, data, &mod.attrib); asn1_end_tag(data); if (!add_mod_to_array_talloc(msg->mem_ctx, &mod, -- cgit