diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-02-22 10:23:44 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-02-22 10:23:44 +0000 |
commit | d9ef8f9ad1ff59faf245c93814fcfa7fd69339a6 (patch) | |
tree | 2149f3f37cce72dcb6e375ce741b83c0eaac8e18 /epan/dissectors/packet-p7.c | |
parent | 4dd920a9aa5a46e6bb69d467c8afa39687621ed9 (diff) |
Ensure we always have a valid top_tree for p1.content. This fixes a problem
with other dissectors using p1.content, such as p7.
Reset global content_type_id so this will be correct in more cases.
This is still not a good solution, because ContentType and Content are
generic objects which may occur individual in P7.
Indicate when to report invalid content-type.
svn path=/trunk/; revision=36025
Diffstat (limited to 'epan/dissectors/packet-p7.c')
-rw-r--r-- | epan/dissectors/packet-p7.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/epan/dissectors/packet-p7.c b/epan/dissectors/packet-p7.c index 61d3692264..2b13933df6 100644 --- a/epan/dissectors/packet-p7.c +++ b/epan/dissectors/packet-p7.c @@ -1762,9 +1762,13 @@ static const ber_sequence_t EntryInformation_sequence[] = { static int dissect_p7_EntryInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + p1_initialize_content_globals (NULL, FALSE); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, EntryInformation_sequence, hf_index, ett_p7_EntryInformation); + p1_initialize_content_globals (NULL, FALSE); + + return offset; } @@ -2691,9 +2695,12 @@ static const ber_sequence_t EntryModification_set[] = { static int dissect_p7_EntryModification(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset, + p1_initialize_content_globals (NULL, FALSE); + offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset, EntryModification_set, hf_index, ett_p7_EntryModification); + p1_initialize_content_globals (NULL, FALSE); + return offset; } @@ -2752,9 +2759,13 @@ static const ber_sequence_t MSMessageSubmissionArgument_sequence[] = { static int dissect_p7_MSMessageSubmissionArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + p1_initialize_content_globals (tree, TRUE); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, MSMessageSubmissionArgument_sequence, hf_index, ett_p7_MSMessageSubmissionArgument); + p1_initialize_content_globals (NULL, FALSE); + + return offset; } |