diff options
-rw-r--r-- | epan/dissectors/packet-amr.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |