diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-06-27 22:38:28 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-06-27 22:38:28 +0000 |
commit | 6d60493b8a546441d6efe2e0593fb6cbafb6cad3 (patch) | |
tree | cd31859e8781762c9f4aad54758f33fe7113905e /asn1/ldap | |
parent | 01568c1709771d0e486cc08d18f8e4c9630936c0 (diff) |
Initialize attributedesc_string in a couple of places so that we
don't end up trying to use an invalid pointer.
svn path=/trunk/; revision=33341
Diffstat (limited to 'asn1/ldap')
-rw-r--r-- | asn1/ldap/ldap.cnf | 5 | ||||
-rw-r--r-- | asn1/ldap/packet-ldap-template.c | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 3dd564d1b4..5ff64acf21 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -252,7 +252,7 @@ gint32 tag; #.FN_BODY ServerSaslCreds VAL_PTR = ¶meter_tvb -tvbuff_t *parameter_tvb; +tvbuff_t *parameter_tvb = NULL; ldap_conv_info_t *ldap_info; %(DEFAULT_BODY)s @@ -410,7 +410,7 @@ ldap_conv_info_t *ldap_info; #.FN_BODY SearchRequest/_untag/scope VAL_PTR = &scope - gint scope; + guint32 scope = 0xffff; const gchar *valstr; %(DEFAULT_BODY)s @@ -673,6 +673,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v #.FN_BODY Filter proto_tree *tr=NULL; proto_item *it=NULL; + attributedesc_string=NULL; if(tree){ it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "Filter: "); diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index 93aa3c3c08..63dd7a2c56 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -727,6 +727,8 @@ dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo, gboolean pc, ind = 0; gint32 ber_tag; + attributedesc_string=NULL; + one_more_pdu: @@ -839,15 +841,9 @@ dissect_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean i /* No. Attach that information to the conversation, and add * it to the list of information structures. */ - ldap_info = g_malloc(sizeof(ldap_conv_info_t)); - ldap_info->auth_type = 0; - ldap_info->auth_mech = 0; - ldap_info->first_auth_frame = 0; + ldap_info = g_malloc0(sizeof(ldap_conv_info_t)); ldap_info->matched=g_hash_table_new(ldap_info_hash_matched, ldap_info_equal_matched); ldap_info->unmatched=g_hash_table_new(ldap_info_hash_unmatched, ldap_info_equal_unmatched); - ldap_info->num_results = 0; - ldap_info->start_tls_frame = 0; - ldap_info->start_tls_pending = FALSE; conversation_add_proto_data(conversation, proto_ldap, ldap_info); @@ -1099,6 +1095,7 @@ int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int maxlen, gbo len=tvb_get_guint8(tvb, offset); offset+=1; *str=0; + attributedesc_string=NULL; while(len){ /* add potential field separation dot */ |