From 8cacdfa8ce7210ea369a9081312eeb26f81a05ec Mon Sep 17 00:00:00 2001 From: Chris Maynard Date: Wed, 11 Dec 2013 23:03:01 +0000 Subject: Reject the packet if data is NULL. Leave the DISSECTOR_ASSERT(actx != NULL) since get_asn1_ctx() also checks the signature. svn path=/trunk/; revision=53953 --- epan/dissectors/packet-amr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-amr.c') diff --git a/epan/dissectors/packet-amr.c b/epan/dissectors/packet-amr.c index a684a0cc35..4ee847e07d 100644 --- a/epan/dissectors/packet-amr.c +++ b/epan/dissectors/packet-amr.c @@ -595,9 +595,14 @@ static amr_capability_t *find_cap(const gchar *id) { static int dissect_amr_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void* data) { - asn1_ctx_t *actx = get_asn1_ctx(data); + asn1_ctx_t *actx; + /* Reject the packet if data is NULL */ + if (data == NULL) + return 0; + actx = get_asn1_ctx(data); DISSECTOR_ASSERT(actx != NULL); + if (tree && (actx != NULL)) { amr_capability_t *ftr; ftr = find_cap(pinfo->match_string); -- cgit v1.2.3