diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-12-19 09:19:33 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-12-19 09:19:33 +0000 |
commit | 317b82898664af0f0fe71c513995bb137d0a3c57 (patch) | |
tree | 37b1f0304675d62189eebd6faaa8d8383eba893e /epan/dissectors/packet-kerberos.c | |
parent | 4a346b71882c782cf070e382a4bf718150b192d8 (diff) |
Use proto_tree_add_item() or tvb_get_string_enc() instead of
tvb_get_unicode_string(). If there's an indication that the encoding is
UCS-2, use that, otherwise use UTF-16. (For example, "BMP" stands for
"Basic Multilingual Plane", which is the part of Unicode that can be
encoded in 16 bits, hence UCS-2.)
In the description of the "Use Heuristics for UDP" preference for the
XML dissector, note that it's not just trying to recognize XML in UCS-2,
it's trying to recognize XML in *big-endian* UCS-2.
svn path=/trunk/; revision=54245
Diffstat (limited to 'epan/dissectors/packet-kerberos.c')
-rw-r--r-- | epan/dissectors/packet-kerberos.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 9b36e756d8..366f477dd1 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -2793,13 +2793,13 @@ dissect_krb5_PAC_PRIVSVR_CHECKSUM(proto_tree *parent_tree, tvbuff_t *tvb, int of return offset; } +/* See [MS-PAC] */ static int dissect_krb5_PAC_CLIENT_INFO_TYPE(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { proto_item *item=NULL; proto_tree *tree=NULL; guint16 namelen; - char *name; item=proto_tree_add_item(parent_tree, hf_krb_PAC_CLIENT_INFO_TYPE, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA); if(parent_tree){ @@ -2816,8 +2816,7 @@ dissect_krb5_PAC_CLIENT_INFO_TYPE(proto_tree *parent_tree, tvbuff_t *tvb, int of offset+=2; /* client name */ - name=tvb_get_unicode_string(wmem_packet_scope(), tvb, offset, namelen, ENC_LITTLE_ENDIAN); - proto_tree_add_string(tree, hf_krb_pac_clientname, tvb, offset, namelen, name); + proto_tree_add_item(tree, hf_krb_pac_clientname, tvb, offset, namelen, ENC_UTF_16|ENC_LITTLE_ENDIAN); offset+=namelen; return offset; |