aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ymsg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-03-03 14:49:20 -0800
committerGuy Harris <guy@alum.mit.edu>2014-03-03 22:52:27 +0000
commit83b994909b7e0b0a95c1b1bb9e080e5e98c2bb70 (patch)
tree930cb48b498639a61abc9a663194e7fce6a2e635 /epan/dissectors/packet-ymsg.c
parentf94674d2fb3e14ce2da1ca5dbce7bf6eacfe7586 (diff)
Show ymsg.content as bytes; it's not a simple string.
The content of a YMSG message is a sequence of lines, each one of which contains a text string (in some ASCII-based encoding) for a key, a 0xc080 separator, and a text string (in some ASCII-based encoding) for a value. That's not a string in any ASCII-based encoding I know of - 0xc0 0x80 is not, for example, a valid UTF-8 sequence (it's a too-long sequence for NUL). This should fix bug 9832: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9832 by avoiding the general "GTK+ on Windows crashes when asked to copy something that's not valid UTF-8" problem. Fix some field descriptions while we're at it. Change-Id: I4084dabc89b0186ecd1a7329452ca2f1cb48f1c0 Reviewed-on: https://code.wireshark.org/review/488 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ymsg.c')
-rw-r--r--epan/dissectors/packet-ymsg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c
index 91d949fcc1..cc0e198338 100644
--- a/epan/dissectors/packet-ymsg.c
+++ b/epan/dissectors/packet-ymsg.c
@@ -421,7 +421,7 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (content_len) {
/* Create content subtree */
content_item = proto_tree_add_item(ymsg_tree, hf_ymsg_content, tvb,
- offset, -1, ENC_ASCII|ENC_NA);
+ offset, -1, ENC_NA);
content_tree = proto_item_add_subtree(content_item, ett_ymsg_content);
/* Each entry consists of:
@@ -515,11 +515,11 @@ proto_register_ymsg(void)
NULL, 0, "Connection ID", HFILL }},
{ &hf_ymsg_content, {
- "Content", "ymsg.content", FT_STRING, BASE_NONE,
+ "Content", "ymsg.content", FT_BYTES, BASE_NONE,
NULL, 0, "Data portion of the packet", HFILL }},
{ &hf_ymsg_content_line, {
"Content-line", "ymsg.content-line", FT_STRING, BASE_NONE,
- NULL, 0, "Data portion of the packet", HFILL }},
+ NULL, 0, "Content line", HFILL }},
{ &hf_ymsg_content_line_key, {
"Key", "ymsg.content-line.key", FT_STRING, BASE_NONE,
NULL, 0, "Content line key", HFILL }},