diff options
author | Gerasimos Dimitriadis <dimeg@intracom.gr> | 2009-12-09 21:18:04 +0000 |
---|---|---|
committer | Gerasimos Dimitriadis <dimeg@intracom.gr> | 2009-12-09 21:18:04 +0000 |
commit | 2e138172a24f6a1456ec2717ea5662b892153f53 (patch) | |
tree | 7313c536f97e86994e7b82ab3e1f299d6864ec66 /epan/dissectors/packet-per.c | |
parent | 142b31816c1a1ff1ea0e0ed1d1b8d4dcb462cf86 (diff) |
Constrained SEQ OF in PER encoding associated with wrong length;
also take into account cases of length 0.
svn path=/trunk/; revision=31219
Diffstat (limited to 'epan/dissectors/packet-per.c')
-rw-r--r-- | epan/dissectors/packet-per.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 8c8b8d5c36..426620db90 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -942,10 +942,17 @@ call_sohelper: } tree=proto_item_add_subtree(item, ett_index); + old_offset = offset; offset=dissect_per_sequence_of_helper(tvb, offset, actx, tree, seq->func, *seq->p_id, length); + if (offset == old_offset) + length = 0; + else if (offset >> 3 == old_offset >> 3) + length = 1; + else + length = (offset >> 3) - (old_offset >> 3); - proto_item_set_len(item, (offset>>3)!=(old_offset>>3)?(offset>>3)-(old_offset>>3):1); + proto_item_set_len(item, length); return offset; } |