aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ber.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-01-19 08:54:13 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-01-19 08:54:13 +0000
commit174de72350b7c53c3f0aa38dbe8ab4928e5da74c (patch)
tree6043fa2244142c4f75d037f94876d0569f1f1f52 /epan/dissectors/packet-ber.c
parent6ff81c8f6aea6510efd75b0def0e81ab2599c8f8 (diff)
Moved expert info for bitstring size constraints below bit values.
Enabled bitstring minimum length size check. svn path=/trunk/; revision=31564
Diffstat (limited to 'epan/dissectors/packet-ber.c')
-rw-r--r--epan/dissectors/packet-ber.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 71483485eb..46cbd001aa 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -3965,7 +3965,7 @@ malformed:
/* 8.6 Encoding of a bitstring value */
-int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint32 min_len _U_, gint32 max_len, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb)
+int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb)
{
gint8 class;
gboolean pc, ind;
@@ -4036,7 +4036,6 @@ int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, p
if(hf_id >= 0) {
item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, len, FALSE);
actx->created_item = item;
- ber_check_length(len*8 - pad, 0, max_len, actx, item, TRUE);
if(ett_id != -1) {
tree = proto_item_add_subtree(item, ett_id);
}
@@ -4097,6 +4096,8 @@ int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, p
}
}
+ ber_check_length(8*len-pad, min_len, max_len, actx, item, TRUE);
+
return end_offset;
}