aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-31 14:06:20 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-31 14:06:20 +0000
commitdbd185b373c44cb1eee706db06faefde2a302d01 (patch)
tree5a7130457d839b764a4e29707975d46591cd13fa /epan/dissectors
parentd473a73c1316f37a133fb9a4c50cdc49c46e221e (diff)
Fix several cases of writing to COL_PROTOCOL w/o checking first
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26645 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ncp-nmas.c6
-rw-r--r--epan/dissectors/packet-ncp-sss.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ncp-nmas.c b/epan/dissectors/packet-ncp-nmas.c
index 22b119af09..56af654986 100644
--- a/epan/dissectors/packet-ncp-nmas.c
+++ b/epan/dissectors/packet-ncp-nmas.c
@@ -301,8 +301,10 @@ dissect_nmas_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, nc
foffset += 1;
/* Fill in the INFO column. */
- if (check_col(pinfo->cinfo, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NMAS");
+ }
+ if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "C NMAS - %s",
val_to_str(subfunc, nmas_func_enum, "Unknown (0x%02x)"));
}
@@ -492,7 +494,7 @@ dissect_nmas_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, guin
subverb = request_value->req_nds_flags;
msgverb = request_value->nds_request_verb;
}
- if (check_col(pinfo->cinfo, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NMAS");
}
if (tvb_reported_length_remaining(tvb, foffset)<4) {
diff --git a/epan/dissectors/packet-ncp-sss.c b/epan/dissectors/packet-ncp-sss.c
index 7141b47a75..4277e625ea 100644
--- a/epan/dissectors/packet-ncp-sss.c
+++ b/epan/dissectors/packet-ncp-sss.c
@@ -579,9 +579,11 @@ dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp
subfunc = tvb_get_guint8(tvb, foffset);
foffset += 1;
- /* Fill in the INFO column. */
- if (check_col(pinfo->cinfo, COL_INFO)) {
+ /* Fill in the PROTOCOL & INFO columns. */
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NSSS");
+ }
+ if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "C SecretStore - %s", val_to_str(subfunc, sss_func_enum, "Unknown (%d)"));
}
switch (subfunc) {
@@ -726,7 +728,7 @@ dissect_sss_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, guint
subverb = request_value->req_nds_flags;
msgverb = request_value->nds_request_verb;
}
- if (check_col(pinfo->cinfo, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NSSS");
}
if (tvb_length_remaining(tvb, foffset)<4) {