From a6ae13dee97af192794a604f348a31b505926d47 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Sun, 8 Sep 2013 21:10:36 +0000 Subject: Slightly different fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9117 : Check that tvb returned by dissect_per_bit_string is not null before trying to use it svn path=/trunk/; revision=51846 --- asn1/atn-cpdlc/atn-cpdlc.cnf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'asn1/atn-cpdlc') diff --git a/asn1/atn-cpdlc/atn-cpdlc.cnf b/asn1/atn-cpdlc/atn-cpdlc.cnf index bf6555a028..3f7efbb4e8 100644 --- a/asn1/atn-cpdlc/atn-cpdlc.cnf +++ b/asn1/atn-cpdlc/atn-cpdlc.cnf @@ -60,15 +60,17 @@ ProtectedAircraftPDUs/startdown protectedstartDownmessage offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &tvb_usr); - switch(check_heur_msg_type(actx->pinfo)){ - case dm: - dissect_atn_cpdlc_ATCDownlinkMessage(tvb_new_subset_remaining(tvb_usr, 0), 0, actx, tree, hf_index); - break; - case um: - dissect_atn_cpdlc_ATCUplinkMessage(tvb_new_subset_remaining(tvb_usr, 0), 0, actx , tree, hf_index); - break; - default: - break; + if (tvb_usr) { + switch(check_heur_msg_type(actx->pinfo)){ + case dm: + dissect_atn_cpdlc_ATCDownlinkMessage(tvb_new_subset_remaining(tvb_usr, 0), 0, actx, tree, hf_index); + break; + case um: + dissect_atn_cpdlc_ATCUplinkMessage(tvb_new_subset_remaining(tvb_usr, 0), 0, actx , tree, hf_index); + break; + default: + break; + } } #.END -- cgit v1.2.1