summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-teamspeak2.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-05-01 14:25:33 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-01 13:14:43 +0000
commit583a47c06e2a27676a7b2e49af2ee89ea0f360c5 (patch)
tree9bf233e1cae71493fb4c087f42b374e0132fcb56 /epan/dissectors/packet-teamspeak2.c
parent601dc7313b73dced123eb0e7ba030d178a720df4 (diff)
downloadwireshark-583a47c06e2a27676a7b2e49af2ee89ea0f360c5.tar.gz
Fix Dereference of null pointer found by Clang analyzer
packet-teamspeak2.c:456:21: warning: Access to field 'fragmented' results in a dereference of a null pointer (loaded from variable 'frag') Change-Id: Ie253991f8d664c4594254bcd4569883614aafe2f Reviewed-on: https://code.wireshark.org/review/1455 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-teamspeak2.c')
-rw-r--r--epan/dissectors/packet-teamspeak2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-teamspeak2.c b/epan/dissectors/packet-teamspeak2.c
index c739524a02..45674d6544 100644
--- a/epan/dissectors/packet-teamspeak2.c
+++ b/epan/dissectors/packet-teamspeak2.c
@@ -453,7 +453,7 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
next_tvb = tvb_new_subset_remaining(tvb, 24);
/* If we have a full packet now dissect it */
- if((new_tvb || !frag->fragmented) && !frag->outoforder)
+ if((new_tvb || (frag && !frag->fragmented)) && !frag->outoforder)
{
switch(type)
{
@@ -493,7 +493,7 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
}
}
/* The packet is out of order, update the cinfo and ignore the packet */
- if(frag->outoforder)
+ if(frag && frag->outoforder)
col_append_str(pinfo->cinfo, COL_INFO, " (Out Of Order, ignored)");
}