aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zdp.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 21:20:52 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 21:20:52 +0000
commitaba06b568d02eb70286c5ae01dd4e15f9c4880f6 (patch)
treefb19178b01823f2231ebc0201c5ff9182892df9a /epan/dissectors/packet-zbee-zdp.c
parentb369351d2f7409b695107b53ed09fd828f919436 (diff)
Reject the packet if data is NULL.
svn path=/trunk/; revision=53893
Diffstat (limited to 'epan/dissectors/packet-zbee-zdp.c')
-rw-r--r--epan/dissectors/packet-zbee-zdp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 12e1655701..778cb29a33 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -999,7 +999,12 @@ dissect_zbee_zdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
guint8 seqno;
guint16 cluster;
guint offset = 0;
- zbee_nwk_packet *nwk = (zbee_nwk_packet *)data;
+ zbee_nwk_packet *nwk;
+
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ nwk = (zbee_nwk_packet *)data;
/* Create the protocol tree. */
proto_root = proto_tree_add_protocol_format(tree, proto_zbee_zdp, tvb, offset, tvb_length(tvb), "ZigBee Device Profile");