aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ldap
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 /asn1/ldap
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 'asn1/ldap')
-rw-r--r--asn1/ldap/packet-ldap-template.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index a602a97540..684eb617d2 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -781,6 +781,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);
@@ -814,7 +816,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;