aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nbns.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-10 20:49:11 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-10 20:49:11 +0000
commitb007fccec3b81b52c109c8d04f890aa0b5d0a226 (patch)
tree3590046339f0b7626114bbb21de766b88855c525 /epan/dissectors/packet-nbns.c
parent5be6dd5feb57180436e741f2abd5edd4f88a5147 (diff)
Reject the packet if data is NULL.
svn path=/trunk/; revision=53914
Diffstat (limited to 'epan/dissectors/packet-nbns.c')
-rw-r--r--epan/dissectors/packet-nbns.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c
index a3d54f1a65..7415d8a3bd 100644
--- a/epan/dissectors/packet-nbns.c
+++ b/epan/dissectors/packet-nbns.c
@@ -1644,7 +1644,7 @@ dissect_continuation_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- struct tcpinfo *tcpinfo = (struct tcpinfo *)data;
+ struct tcpinfo *tcpinfo;
int offset = 0;
int max_data;
guint8 msg_type;
@@ -1653,6 +1653,11 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
int len;
gboolean is_cifs;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ tcpinfo = (struct tcpinfo *)data;
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NBSS");
col_clear(pinfo->cinfo, COL_INFO);