aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_rr.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-06 18:44:38 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-06 18:44:38 +0000
commite6c8aa18d11ad2ab07292211009fd1f27c452ba6 (patch)
tree888abc79652fff95940898282ca45dd16ede2fe4 /epan/dissectors/packet-gsm_a_rr.c
parentb768099e17f6531c4c5c90072eca63d17b568f17 (diff)
Prevent possible (benign ?) array references with an array index of -1.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29312 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gsm_a_rr.c')
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index a46bcb0260..ef2de9b48b 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -8398,9 +8398,11 @@ void get_rr_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf
gint idx;
*msg_str = match_strval_idx((guint32) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
- *ett_tree = ett_gsm_dtap_msg_rr[idx];
*hf_idx = hf_gsm_a_dtap_msg_rr_type;
- *msg_fcn = dtap_msg_rr_fcn[idx];
+ if (*msg_str != NULL) {
+ *ett_tree = ett_gsm_dtap_msg_rr[idx];
+ *msg_fcn = dtap_msg_rr_fcn[idx];
+ }
return;
}
@@ -8656,9 +8658,11 @@ void get_rr_short_pd_msg_params(guint8 mess_type, const gchar **msg_str, int *et
gint idx;
*msg_str = match_strval_idx((guint32) mess_type, gsm_a_sacch_msg_rr_strings, &idx);
- *ett_tree = ett_gsm_sacch_msg_rr[idx];
*hf_idx = hf_gsm_a_sacch_msg_rr_type;
- *msg_fcn = sacch_msg_rr_fcn[idx];
+ if (*msg_str != NULL) {
+ *ett_tree = ett_gsm_sacch_msg_rr[idx];
+ *msg_fcn = sacch_msg_rr_fcn[idx];
+ }
}
const value_string short_protocol_discriminator_vals[] = {