diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2013-03-24 10:09:16 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2013-03-24 10:09:16 +0000 |
commit | 92dce1c3f02e9613ed41e5d199a7d944b0058f82 (patch) | |
tree | 13de5c944c225812de3672a94f2b874330f37662 /epan/dissectors/packet-gsm_a_gm.c | |
parent | 8ccea72f1006090d223f2803b8b4a7a1e9eb2363 (diff) |
Do not initialize ett_tree and dtap_msg_fcn when match_strval_idx does not find a match
svn path=/trunk/; revision=48520
Diffstat (limited to 'epan/dissectors/packet-gsm_a_gm.c')
-rw-r--r-- | epan/dissectors/packet-gsm_a_gm.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 69d221458c..034dd4b6f1 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -7117,9 +7117,11 @@ get_gmm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx gint idx; *msg_str = match_strval_idx((guint32) (oct & DTAP_GMM_IEI_MASK), gsm_a_dtap_msg_gmm_strings, &idx); - *ett_tree = ett_gsm_dtap_msg_gmm[idx]; *hf_idx = hf_gsm_a_dtap_msg_gmm_type; - *dtap_msg_fcn = dtap_msg_gmm_fcn[idx]; + if (*msg_str != NULL) { + *ett_tree = ett_gsm_dtap_msg_gmm[idx]; + *dtap_msg_fcn = dtap_msg_gmm_fcn[idx]; + } return; } @@ -7130,9 +7132,11 @@ get_sm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, gint idx; *msg_str = match_strval_idx((guint32) (oct & DTAP_SM_IEI_MASK), gsm_a_dtap_msg_sm_strings, &idx); - *ett_tree = ett_gsm_dtap_msg_sm[idx]; *hf_idx = hf_gsm_a_dtap_msg_sm_type; - *dtap_msg_fcn = dtap_msg_sm_fcn[idx]; + if (*msg_str != NULL) { + *ett_tree = ett_gsm_dtap_msg_sm[idx]; + *dtap_msg_fcn = dtap_msg_sm_fcn[idx]; + } return; } |