Initialize a variable.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 30 Jun 2010 23:45:24 +0000 (23:45 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 30 Jun 2010 23:45:24 +0000 (23:45 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33390 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/ldap/ldap.cnf
epan/dissectors/packet-ldap.c

index d365cde4939518cb4855161147cfaf5a57c74d33..38ee6d81a6350bb9d6b491be2c438a431e1cec50 100644 (file)
@@ -463,6 +463,8 @@ ldap_conv_info_t *ldap_info;
   guint32      i, len;
   int           old_offset = offset;
 
+  attr_type=NULL;
+
   /* extract the value of the octetstring */
   offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, offset, hf_index, &next_tvb);
 
index a15d9c92d04ee4f9065bf0de4c68656fad92cbd1..676ffef919fc250999ae3d18643f0b4661d1f5f3 100644 (file)
@@ -1211,7 +1211,7 @@ dissect_ldap_SaslCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
 
 static int
 dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 689 "ldap.cnf"
+#line 691 "ldap.cnf"
        /* make sure the protocol op comes first */
                ldap_do_protocolop(actx->pinfo);
 
@@ -1227,7 +1227,7 @@ dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
 
 static int
 dissect_ldap_T_ntlmsspAuth(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 696 "ldap.cnf"
+#line 698 "ldap.cnf"
        /* make sure the protocol op comes first */
                ldap_do_protocolop(actx->pinfo);
 
@@ -1258,7 +1258,7 @@ static const ber_choice_t AuthenticationChoice_choice[] = {
 
 static int
 dissect_ldap_AuthenticationChoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 493 "ldap.cnf"
+#line 495 "ldap.cnf"
   gint branch = -1;
   gint auth = -1;
   const gchar *valstr;
@@ -1392,7 +1392,7 @@ dissect_ldap_BindResponse_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U
 
 static int
 dissect_ldap_T_bindResponse_matchedDN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 703 "ldap.cnf"
+#line 705 "ldap.cnf"
        tvbuff_t *new_tvb=NULL;
 
        offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
@@ -1571,7 +1571,7 @@ dissect_ldap_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
 
 static int
 dissect_ldap_UnbindRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 515 "ldap.cnf"
+#line 517 "ldap.cnf"
 
  implicit_tag = TRUE; /* correct problem with asn2wrs */
 
@@ -1667,7 +1667,7 @@ static int
 dissect_ldap_T_and_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 557 "ldap.cnf"
+#line 559 "ldap.cnf"
        if(and_filter_string){
                and_filter_string=ep_strdup_printf("(&%s%s)",and_filter_string,Filter_string);
        } else {
@@ -1685,7 +1685,7 @@ static const ber_sequence_t T_and_set_of[1] = {
 
 static int
 dissect_ldap_T_and(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 564 "ldap.cnf"
+#line 566 "ldap.cnf"
        proto_tree *tr=NULL;
        proto_item *it=NULL;
        const char *old_and_filter_string=and_filter_string;
@@ -1718,7 +1718,7 @@ static int
 dissect_ldap_T_or_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 584 "ldap.cnf"
+#line 586 "ldap.cnf"
        if(or_filter_string){
                or_filter_string=ep_strdup_printf("(|%s%s)",or_filter_string,Filter_string);
        } else {
@@ -1737,7 +1737,7 @@ static const ber_sequence_t T_or_set_of[1] = {
 
 static int
 dissect_ldap_T_or(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 592 "ldap.cnf"
+#line 594 "ldap.cnf"
        proto_tree *tr=NULL;
        proto_item *it=NULL;
        const char *old_or_filter_string=or_filter_string;
@@ -1768,7 +1768,7 @@ static int
 dissect_ldap_T_not(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 613 "ldap.cnf"
+#line 615 "ldap.cnf"
        Filter_string=ep_strdup_printf("(!%s)",string_or_null(Filter_string));
 
 
@@ -1806,7 +1806,7 @@ static int
 dissect_ldap_T_equalityMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 534 "ldap.cnf"
+#line 536 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s=%s)",
                                       string_or_null(attributedesc_string),
                                       string_or_null(ldapvalue_string));
@@ -1837,7 +1837,7 @@ dissect_ldap_T_substringFilter_substrings_item(gboolean implicit_tag _U_, tvbuff
                                  T_substringFilter_substrings_item_choice, hf_index, ett_ldap_T_substringFilter_substrings_item,
                                  NULL);
 
-#line 639 "ldap.cnf"
+#line 641 "ldap.cnf"
        if (substring_item_final) {
                substring_value=ep_strdup_printf("%s%s",
                                                 (substring_value?substring_value:"*"),
@@ -1877,7 +1877,7 @@ static const ber_sequence_t SubstringFilter_sequence[] = {
 
 static int
 dissect_ldap_SubstringFilter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 653 "ldap.cnf"
+#line 655 "ldap.cnf"
        proto_tree *tr=NULL;
        proto_item *it=NULL;
        const char *old_substring_value=substring_value;
@@ -1912,7 +1912,7 @@ static int
 dissect_ldap_T_greaterOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 540 "ldap.cnf"
+#line 542 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s>=%s)",
                                       string_or_null(attributedesc_string),
                                       string_or_null(ldapvalue_string));
@@ -1928,7 +1928,7 @@ static int
 dissect_ldap_T_lessOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 546 "ldap.cnf"
+#line 548 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s<=%s)",
                                       string_or_null(attributedesc_string),
                                       string_or_null(ldapvalue_string));
@@ -1944,7 +1944,7 @@ static int
 dissect_ldap_T_present(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_AttributeDescription(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 610 "ldap.cnf"
+#line 612 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s=*)",string_or_null(Filter_string));
 
 
@@ -1957,7 +1957,7 @@ static int
 dissect_ldap_T_approxMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
   offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 552 "ldap.cnf"
+#line 554 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s~=%s)",
                                       string_or_null(attributedesc_string),
                                       string_or_null(ldapvalue_string));
@@ -1979,7 +1979,7 @@ dissect_ldap_MatchingRuleId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
 
 static int
 dissect_ldap_T_dnAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 616 "ldap.cnf"
+#line 618 "ldap.cnf"
        gboolean val;
 
 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &val);
@@ -2014,7 +2014,7 @@ dissect_ldap_MatchingRuleAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
 
 static int
 dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 625 "ldap.cnf"
+#line 627 "ldap.cnf"
        attr_type=NULL;
        matching_rule_string=NULL;
        ldapvalue_string=NULL;
@@ -2023,7 +2023,7 @@ dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
 
   offset = dissect_ldap_MatchingRuleAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 631 "ldap.cnf"
+#line 633 "ldap.cnf"
        Filter_string=ep_strdup_printf("(%s:%s%s%s=%s)",
                                        (attr_type?attr_type:""),
                                        (matching_rule_dnattr?"dn:":""),
@@ -2066,7 +2066,7 @@ static const ber_choice_t Filter_choice[] = {
 
 static int
 dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 675 "ldap.cnf"
+#line 677 "ldap.cnf"
        proto_tree *tr=NULL;
        proto_item *it=NULL;
        attributedesc_string=NULL;
@@ -2092,13 +2092,13 @@ dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
 
 static int
 dissect_ldap_T_filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 527 "ldap.cnf"
+#line 529 "ldap.cnf"
        Filter_string=NULL;
 
 
   offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
 
-#line 530 "ldap.cnf"
+#line 532 "ldap.cnf"
        Filter_string=NULL;
        and_filter_string=NULL;
 
@@ -2161,6 +2161,8 @@ dissect_ldap_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
   guint32      i, len;
   int           old_offset = offset;
 
+  attr_type=NULL;
+
   /* extract the value of the octetstring */
   offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, offset, hf_index, &next_tvb);
 
@@ -2378,7 +2380,7 @@ dissect_ldap_SEQUENCE_OF_LDAPURL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
 
 static int
 dissect_ldap_SearchResultReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 763 "ldap.cnf"
+#line 765 "ldap.cnf"
 
    offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
                                       hf_index, BER_CLASS_APP, 19, TRUE, dissect_ldap_SEQUENCE_OF_LDAPURL);
@@ -2655,7 +2657,7 @@ dissect_ldap_CompareResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
 
 static int
 dissect_ldap_AbandonRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 770 "ldap.cnf"
+#line 772 "ldap.cnf"
 
    offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
                                       hf_index, BER_CLASS_APP, 16, TRUE, dissect_ldap_MessageID);
@@ -2727,7 +2729,7 @@ dissect_ldap_LDAPOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
 
 static int
 dissect_ldap_T_requestValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 738 "ldap.cnf"
+#line 740 "ldap.cnf"
 
        if((object_identifier_id != NULL) && oid_has_dissector(object_identifier_id)) {
                offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -2876,12 +2878,12 @@ dissect_ldap_ExtendedResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
 
 static int
 dissect_ldap_T_intermediateResponse_responseValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 746 "ldap.cnf"
+#line 748 "ldap.cnf"
 
        const gchar *name;
 
 
-#line 750 "ldap.cnf"
+#line 752 "ldap.cnf"
        if(ldm_tree && object_identifier_id) {
                proto_item_set_text(ldm_tree, "%s %s", "IntermediateResponse", object_identifier_id);
                name = oid_resolved_from_string(object_identifier_id);
@@ -3062,7 +3064,7 @@ dissect_ldap_ControlType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
 
 static int
 dissect_ldap_T_controlValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 719 "ldap.cnf"
+#line 721 "ldap.cnf"
        gint8 class;
        gboolean pc, ind;
        gint32 tag;