aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ber.c
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-30 06:19:32 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-09-30 06:19:32 +0000
commitb24d68580bc465703e23b3d6c98613c4dec6e984 (patch)
tree2b718e79a648cee161999892c01dad9ed10b39a2 /epan/dissectors/packet-ber.c
parent389b9cdb3d3021d82b5e2d605e2a110e32062b89 (diff)
Constructed octet strings may contain zero encodings.
(X.690 chapter 8.7.3) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34284 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ber.c')
-rw-r--r--epan/dissectors/packet-ber.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 705bf5ea66..44615e5521 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -1138,12 +1138,15 @@ reassemble_octet_string(asn1_ctx_t *actx, proto_tree *tree, gint hf_id, tvbuff_t
/* so we need to consume octet strings for the given length */
- /* not sure we need this */
- actx->pinfo->fragmented = TRUE;
-
if(out_tvb)
*out_tvb=NULL;
+ if (con_len == 0) /* Zero encodings (8.7.3) */
+ return offset;
+
+ /* not sure we need this */
+ actx->pinfo->fragmented = TRUE;
+
while(!fd_head) {
offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, offset, hf_id, &next_tvb);