Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2206 : don't write into COL_INFO unless we've checked that it's there first.

svn path=/trunk/; revision=24125
This commit is contained in:
Jeff Morriss 2008-01-17 21:40:33 +00:00
parent 83888f9c01
commit f136a90eff
1 changed files with 2 additions and 2 deletions

View File

@ -564,7 +564,7 @@ dissect_cmpp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
total_length = tvb_get_ntohl(tvb, 0); /* Get the pdu length */
command_id = tvb_get_ntohl(tvb, 4); /* get the pdu command id */
if (match_strval(command_id, vals_command_Id) == NULL)
if (check_col(pinfo->cinfo, COL_INFO) && match_strval(command_id, vals_command_Id) == NULL)
{
col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown command_id %u",
command_id);
@ -575,7 +575,7 @@ dissect_cmpp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"(Unknown CMPP Operation 0x%08X)");
/* tvb has less data then the PDU Header status, return */
if (tvb_len < total_length)
if (check_col(pinfo->cinfo, COL_INFO) && tvb_len < total_length)
{
col_append_fstr(pinfo->cinfo, COL_INFO, "%s pdu length (%u) < Total_Length (%u)",
command_str, tvb_len, total_length);