dcerpc_info *di;
proto_item *string_item;
proto_tree *string_tree;
- guint32 len, buffer_len,buffer_len2, max;
+ guint32 len, buffer_len;
char *s;
- guint8* buf;
header_field_info *hfinfo;
di=pinfo->private_data;
/* NDR array header */
offset = dissect_ndr_uint32(tvb, offset, pinfo, string_tree, drep,
- hf_dcerpc_array_max_count, &max);
+ hf_dcerpc_array_max_count, NULL);
offset = dissect_ndr_uint32(tvb, offset, pinfo, string_tree, drep,
hf_dcerpc_array_offset, NULL);
offset = dissect_ndr_uint32(tvb, offset, pinfo, string_tree, drep,
hf_dcerpc_array_actual_count, &len);
buffer_len = size_is * len;
- buffer_len2 = size_is * max;
hfinfo = proto_registrar_get_nth(hfindex);
/* Adjust offset */
if (offset % size_is)
offset += size_is - (offset % size_is);
- if( buffer_len2 != buffer_len && hfinfo->type == FT_STRING && tvb_reported_length_remaining(tvb,offset) > (gint)buffer_len2) {
- /* Max can be bigger that len
- * if the packet is comming from windows it normally means that the
- * last two bytes are null terminators. In this case we change the length
- * in order to consume them ...
- * If it's from samba then it's more unlikely to be terminator so we carefully check if
- * it's null terminators or not in order to know if we should consume them */
-
- buf = ep_alloc(sizeof(guint8)*buffer_len2);
- tvb_memcpy(tvb,buf,offset,buffer_len2);
- if( buf[buffer_len2-2] == 0x0 && buf[buffer_len2-1] == 0x0) {
- buffer_len = buffer_len2;
- }
- }
if (size_is == sizeof(guint16)) {
/* XXX - use drep to determine the byte order? */
s = tvb_fake_unicode(tvb, offset, buffer_len / 2, TRUE);