diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-02 17:13:36 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-02 17:13:36 +0000 |
commit | 8ffbb8ade834c899790c808e479cb471680c16b5 (patch) | |
tree | a2f625d937df6e1b84736fce7c6e3fce7e6e6c6d /epan/dissectors/packet-scop.c | |
parent | de23882f078aa2acca02a8b53877b2035a5916b0 (diff) |
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5173 :
Don't call col_set_str() on a string returned from val_to_str() (which may be
ep_ allocated).
svn path=/trunk/; revision=34045
Diffstat (limited to 'epan/dissectors/packet-scop.c')
-rw-r--r-- | epan/dissectors/packet-scop.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c index f90fec452c..783f2d85fe 100644 --- a/epan/dissectors/packet-scop.c +++ b/epan/dissectors/packet-scop.c @@ -143,7 +143,8 @@ static dissector_handle_t ieee802154_handle; * guint - Length of SCoP packet *--------------------------------------------------------------- */ -static guint get_scop_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) +static guint +get_scop_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* Byte 0: Protocol Type. * Byte 1: Protocol Version. @@ -166,7 +167,8 @@ static guint get_scop_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) * void *--------------------------------------------------------------- */ -static void dissect_scop_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void +dissect_scop_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, SCOP_HEADER_LENGTH, get_scop_length, dissect_scop); } /* dissect_scop_tcp */ @@ -184,7 +186,8 @@ static void dissect_scop_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree * void *--------------------------------------------------------------- */ -static void dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void +dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvbuff_t *next_tvb; proto_item *proto_root; @@ -269,7 +272,8 @@ static void dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * void *--------------------------------------------------------------- */ -static void dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void +dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint offset = 0; guint8 type = tvb_get_guint8(tvb, offset); @@ -278,7 +282,7 @@ static void dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Display the Packet type*/ proto_tree_add_uint(tree, hf_scop_type, tvb, offset, 1, type); proto_item_append_text(tree, ", %s", val_to_str(type, scop_types, "Reserved Type")); - col_set_str(pinfo->cinfo, COL_INFO, val_to_str(type, scop_types, "Reserved Type")); + col_add_str(pinfo->cinfo, COL_INFO, val_to_str(type, scop_types, "Reserved Type")); offset += 2; if (type == SCOP_CMD_HELLO_RESP) { @@ -308,7 +312,8 @@ static void dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree * void *--------------------------------------------------------------- */ -static void dissect_scop_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void +dissect_scop_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { call_dissector(ieee802154_handle, tvb, pinfo, proto_tree_get_root(tree)); } /* dissect_scop_bridge() */ |