diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-05 10:07:49 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-04-05 10:07:49 +0000 |
commit | 6288aa7ff2275b180acf3c4a3cb1f58dbc7194f1 (patch) | |
tree | 6ffc2fbc2958155172ba2d508e436fc12306a5f1 /epan/dissectors | |
parent | 1e5e285a3446b2171e27072a1e9d6ec85dbb31a2 (diff) |
from previous commit
dont dereference cdata null pointer
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17814 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-fcp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c index 48dfabb79a..1840989790 100644 --- a/epan/dissectors/packet-fcp.c +++ b/epan/dissectors/packet-fcp.c @@ -583,11 +583,11 @@ dissect_fcp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro pinfo->private_data = NULL; } - if (cdata->fcp_lun >= 0) - proto_tree_add_uint_hidden(tree, hf_fcp_singlelun, tvb, - 0, 0, cdata->fcp_lun); - if (cdata) { + if (cdata->fcp_lun >= 0) + proto_tree_add_uint_hidden(tree, hf_fcp_singlelun, tvb, + 0, 0, cdata->fcp_lun); + dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, (guint16) cdata->fcp_lun); } else { dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, 0xffff); @@ -750,7 +750,7 @@ dissect_fcp_xfer_rdy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, cdata = (fcp_conv_data_t *)g_hash_table_lookup (fcp_req_hash, &ckey); - if (cdata != NULL) { + if (cdata) { cdata->fcp_dl = tvb_get_ntohl (tvb, offset+4); } else { |