aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-10 03:33:50 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-10 03:33:50 +0000
commit6e3732104203ed72004d697686380e20db0898ef (patch)
tree4ae1a713d229a0c6ac7b330e82727fd9bbad9586 /epan/dissectors
parentc5e358116c2652d18d06ad864961f03275696537 (diff)
Reject the packet if data is NULL.
svn path=/trunk/; revision=53899
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-fcels.c7
-rw-r--r--epan/dissectors/packet-fcfcs.c7
-rw-r--r--epan/dissectors/packet-fcfzs.c7
-rw-r--r--epan/dissectors/packet-fcp.c7
-rw-r--r--epan/dissectors/packet-fcswils.c7
5 files changed, 30 insertions, 5 deletions
diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c
index 244caf9695..87ad5b0cfa 100644
--- a/epan/dissectors/packet-fcels.c
+++ b/epan/dissectors/packet-fcels.c
@@ -1846,7 +1846,12 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
guint options;
address dstaddr;
guint8 addrdata[3];
- fc_hdr *fchdr = (fc_hdr *)data;
+ fc_hdr *fchdr;
+
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ fchdr = (fc_hdr *)data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FC ELS");
diff --git a/epan/dissectors/packet-fcfcs.c b/epan/dissectors/packet-fcfcs.c
index f858a4f8bc..ef86c94ea7 100644
--- a/epan/dissectors/packet-fcfcs.c
+++ b/epan/dissectors/packet-fcfcs.c
@@ -778,7 +778,12 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
fcfcs_conv_key_t ckey, *req_key;
int opcode,
failed_opcode = 0;
- fc_hdr *fchdr = (fc_hdr *)data;
+ fc_hdr *fchdr;
+
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ fchdr = (fc_hdr *)data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FC-FCS");
diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c
index b3f459325f..a6250cdbb9 100644
--- a/epan/dissectors/packet-fcfzs.c
+++ b/epan/dissectors/packet-fcfzs.c
@@ -593,7 +593,12 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
fcfzs_conv_data_t *cdata;
fcfzs_conv_key_t ckey, *req_key;
gboolean isreq = TRUE;
- fc_hdr *fchdr = (fc_hdr *)data;
+ fc_hdr *fchdr;
+
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ fchdr = (fc_hdr *)data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Zone Server");
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index 0dbfcbcc02..8569ce5c24 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -732,7 +732,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
proto_item *ti = NULL;
proto_tree *fcp_tree = NULL;
- fc_hdr *fchdr = (fc_hdr *)data;
+ fc_hdr *fchdr;
guint8 r_ctl;
conversation_t *fc_conv;
fcp_conv_data_t *fcp_conv_data = NULL;
@@ -740,6 +740,11 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
gboolean els;
fcp_proto_data_t *proto_data;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ fchdr = (fc_hdr *)data;
+
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FCP");
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index 27aecca580..c6dc254916 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -1771,7 +1771,12 @@ dissect_fcswils(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
proto_tree *swils_tree = NULL;
guint8 isreq = FC_SWILS_REQ;
tvbuff_t *next_tvb;
- fc_hdr *fchdr = (fc_hdr *)data;
+ fc_hdr *fchdr;
+
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ fchdr = (fc_hdr *)data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SW_ILS");