aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-umts_fp.c4
-rw-r--r--epan/proto.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 038482d201..509121d4f0 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -378,7 +378,7 @@ int dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tree)
{
/* Add data subtree */
- tree_ti = proto_tree_add_item(tree, hf_fp_data, tvb, offset, 0, FALSE);
+ tree_ti = proto_tree_add_item(tree, hf_fp_data, tvb, offset, -1, FALSE);
proto_item_set_text(tree_ti, "TB data for %u chans", p_fp_info->num_chans);
data_tree = proto_item_add_subtree(tree_ti, ett_fp_data);
}
@@ -458,7 +458,7 @@ int dissect_macd_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Add data subtree */
if (tree)
{
- pdus_ti = proto_tree_add_item(tree, hf_fp_data, tvb, offset, 0, FALSE);
+ pdus_ti = proto_tree_add_item(tree, hf_fp_data, tvb, offset, -1, FALSE);
proto_item_set_text(pdus_ti, "%u MAC-d PDUs of %u bits", number_of_pdus, length);
data_tree = proto_item_add_subtree(pdus_ti, ett_fp_data);
}
diff --git a/epan/proto.c b/epan/proto.c
index 789f6e7ee1..5944f9f170 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -3205,6 +3205,9 @@ proto_item_set_len(proto_item *pi, gint length)
fi = PITEM_FINFO(pi);
DISSECTOR_ASSERT(length >= 0);
fi->length = length;
+
+ if (fi->value.ftype->ftype == FT_BYTES)
+ fi->value.value.bytes->len = length;
}
/*