aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-q931.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-06-06 14:46:22 +0200
committerEvan Huus <eapache@gmail.com>2014-06-06 14:05:44 +0000
commited2bb85035ea079201e81bd67854290739a5e1d4 (patch)
tree40c9c1b59740552ca709922925d96176a2d08d5d /epan/dissectors/packet-q931.c
parentbe23f163ae182819a81b0a0779522bea6b16ed5a (diff)
Fix Dereference of null pointer found by Clang analyzer
packet-q931.c:2532:25: warning: Access to field 'message_type' results in a dereference of a null pointer (loaded from variable 'q931_pi') Change-Id: I7533ff60c541e31efe4522e710f86175c1c0ccf4 Reviewed-on: https://code.wireshark.org/review/1997 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-q931.c')
-rw-r--r--epan/dissectors/packet-q931.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 1bf4bb1cd2..f32b9511a3 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -2528,7 +2528,7 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
- if(have_valid_q931_pi) {
+ if(have_valid_q931_pi && q931_pi) {
q931_pi->message_type = message_type;
}
col_add_str(pinfo->cinfo, COL_INFO, get_message_name(prot_discr, message_type));