aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ldap.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-08-25 17:31:15 +0000
committerEvan Huus <eapache@gmail.com>2013-08-25 17:31:15 +0000
commitb5900e53d9eaf5defebf06cb2ed439e5cdeed110 (patch)
tree74345564621664a1db6699b3fd99a5fe510a1bcf /epan/dissectors/packet-ldap.c
parentccbaea51d8249c8849f7e10304d3cd784ce9422e (diff)
Make sure our ldap_call_response_t struct is always completely initialized,
fixing a "Conditional jump or move depends on uninitialised value" error found by valgrind fuzzing. svn path=/trunk/; revision=51516
Diffstat (limited to 'epan/dissectors/packet-ldap.c')
-rw-r--r--epan/dissectors/packet-ldap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 1d9194e763..620755b11d 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -1000,6 +1000,8 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
lcr.req_frame=0;
lcr.rep_frame=pinfo->fd->num;
break;
+ default:
+ return NULL;
}
lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->matched, &lcr);
@@ -1033,7 +1035,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
}
/* if we cant reuse the old one, grab a new chunk */
if(!lcrp){
- lcrp=se_new(ldap_call_response_t);
+ lcrp=se_new0(ldap_call_response_t);
}
lcrp->messageId=messageId;
lcrp->req_frame=pinfo->fd->num;
@@ -3840,7 +3842,7 @@ static void dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_in
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 881 "../../asn1/ldap/packet-ldap-template.c"
+#line 883 "../../asn1/ldap/packet-ldap-template.c"
static void
dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
@@ -5775,7 +5777,7 @@ void proto_register_ldap(void) {
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2235 "../../asn1/ldap/packet-ldap-template.c"
+#line 2237 "../../asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
@@ -5850,7 +5852,7 @@ void proto_register_ldap(void) {
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2248 "../../asn1/ldap/packet-ldap-template.c"
+#line 2250 "../../asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -6016,7 +6018,7 @@ proto_reg_handoff_ldap(void)
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2397 "../../asn1/ldap/packet-ldap-template.c"
+#line 2399 "../../asn1/ldap/packet-ldap-template.c"
}