diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-10 03:33:50 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-10 03:33:50 +0000 |
commit | 6e3732104203ed72004d697686380e20db0898ef (patch) | |
tree | 4ae1a713d229a0c6ac7b330e82727fd9bbad9586 /epan/dissectors/packet-fcp.c | |
parent | c5e358116c2652d18d06ad864961f03275696537 (diff) |
Reject the packet if data is NULL.
svn path=/trunk/; revision=53899
Diffstat (limited to 'epan/dissectors/packet-fcp.c')
-rw-r--r-- | epan/dissectors/packet-fcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
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"); |