According to the part of the DCE RPC spec at
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 1 Dec 2004 06:44:54 +0000 (06:44 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 1 Dec 2004 06:44:54 +0000 (06:44 +0000)
http://www.opengroup.org/onlinepubs/009629399/chap12.htm#tagcjh_17_06_01

the number of transfer syntaxes is a u_int8, with an alignment pad byte
following it, not a u_int16.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12631 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-dcerpc.c

index dd6f0a3cf4bbec4f2fe63fcc96ea966b85dcfe58..2a281f8a86854bbc4e65ccc8a25734d8578fd2a2 100644 (file)
@@ -2239,7 +2239,7 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, gint offset, packet_info *pinfo,
     guint i;
     gboolean saw_ctx_item = FALSE;
     guint16 ctx_id;
-    guint16 num_trans_items;
+    guint8 num_trans_items;
     guint j;
     e_uuid_t if_id;
     e_uuid_t trans_id;
@@ -2289,8 +2289,11 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, gint offset, packet_info *pinfo,
              ctx_tree = proto_item_add_subtree(ctx_item, ett_dcerpc_cn_ctx);
       }
 
-      offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, ctx_tree, hdr->drep,
-                                      hf_dcerpc_cn_num_trans_items, &num_trans_items);
+      offset = dissect_dcerpc_uint8 (tvb, offset, pinfo, ctx_tree, hdr->drep,
+                                     hf_dcerpc_cn_num_trans_items, &num_trans_items);
+
+      /* padding */
+      offset += 1;
 
       /* XXX - use "dissect_ndr_uuid_t()"? */
       dcerpc_tvb_get_uuid (tvb, offset, hdr->drep, &if_id);
@@ -4618,7 +4621,7 @@ proto_register_dcerpc (void)
         { &hf_dcerpc_cn_ctx_id,
           { "Context ID", "dcerpc.cn_ctx_id", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
         { &hf_dcerpc_cn_num_trans_items,
-          { "Num Trans Items", "dcerpc.cn_num_trans_items", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
+          { "Num Trans Items", "dcerpc.cn_num_trans_items", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }},
         { &hf_dcerpc_cn_bind_if_id,
           { "Interface UUID", "dcerpc.cn_bind_to_uuid", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
         { &hf_dcerpc_cn_bind_if_ver,