aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_rr.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-06-21 14:24:34 +0000
committerBill Meier <wmeier@newsguy.com>2010-06-21 14:24:34 +0000
commite79dddc257d0c21c58d1a10f422d80da38f874e6 (patch)
treee281a695ca775f5a98d18dfb9d0d6ec65b43ed6c /epan/dissectors/packet-gsm_a_rr.c
parent3e829eb5649eac9c5351cb87cb2e0bc7edd720e3 (diff)
Add an if-test to fix a fuzz-test crash;
See Bug #4897: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4897 svn path=/trunk/; revision=33280
Diffstat (limited to 'epan/dissectors/packet-gsm_a_rr.c')
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index ade270e282..e72222b07a 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -6238,7 +6238,10 @@ de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
sub_tvb = tvb_new_subset(tvb, offset, len, len);
- call_dissector(rrlp_dissector, sub_tvb, gsm_a_dtap_pinfo, tree);
+ /* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_apdu_data */
+ /* XXX: test added to match de_rr_ho_to_utran_cmd & etc (and to fix a crash) */
+ if (rrlp_dissector && gsm_a_dtap_pinfo)
+ call_dissector(rrlp_dissector, sub_tvb, gsm_a_dtap_pinfo, tree);
return len;
}