aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-amr.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-11 23:03:01 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-11 23:03:01 +0000
commit8cacdfa8ce7210ea369a9081312eeb26f81a05ec (patch)
treed7262b263bffd916a25626e86bfdf431e912d5b3 /epan/dissectors/packet-amr.c
parenta81424382e3bd98672b1a9979065779ac6922718 (diff)
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
Diffstat (limited to 'epan/dissectors/packet-amr.c')
-rw-r--r--epan/dissectors/packet-amr.c7
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);