diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-04 08:11:09 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2009-10-04 08:11:09 +0000 |
commit | b6479d592ccec85dfc6aff516fbaa45ccf5809db (patch) | |
tree | 127c42314a53ea34473ad757a2d7c4d5a4a3d34f /epan/dissectors/packet-dcerpc-nt.c | |
parent | 1b2498d074bd96c89829b360c73c817a058c873c (diff) |
update the string helpers to be ndr64 aware
svn path=/trunk/; revision=30285
Diffstat (limited to 'epan/dissectors/packet-dcerpc-nt.c')
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index 8888f74e1f..1f08c5797f 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -83,9 +83,9 @@ dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset, dcerpc_info *di = pinfo->private_data; guint16 len, size; - /* Structure starts with short, but is aligned for longs */ + /* Structure starts with short, but is aligned for pointer */ - ALIGN_TO_4_BYTES; + ALIGN_TO_5_BYTES; if (di->conformant_run) return offset; @@ -109,6 +109,10 @@ dissect_ndr_counted_string_cb(tvbuff_t *tvb, int offset, dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE, "Character Array", hf_index, callback, callback_args); + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_5_BYTES; + } + return offset; } @@ -186,9 +190,9 @@ dissect_ndr_counted_byte_array_cb(tvbuff_t *tvb, int offset, proto_tree *subtree; guint16 len, size; - /* Structure starts with short, but is aligned for longs */ + /* Structure starts with short, but is aligned for pointer */ - ALIGN_TO_4_BYTES; + ALIGN_TO_5_BYTES; if (di->conformant_run) return offset; @@ -217,6 +221,10 @@ dissect_ndr_counted_byte_array_cb(tvbuff_t *tvb, int offset, dissect_ndr_char_cvstring, NDR_POINTER_UNIQUE, "Byte Array", hf_index, callback, callback_args); + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_5_BYTES; + } + return offset; } @@ -292,9 +300,9 @@ dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset, proto_tree *subtree; guint16 len, size; - /* Structure starts with short, but is aligned for longs */ + /* Structure starts with short, but is aligned for pointer */ - ALIGN_TO_4_BYTES; + ALIGN_TO_5_BYTES; if (di->conformant_run) return offset; @@ -323,6 +331,10 @@ dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset, dissect_ndr_char_cvstring, NDR_POINTER_UNIQUE, "Ascii String", hf_index, callback, callback_args); + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_5_BYTES; + } + return offset; } |