From 822c02b5d0c46e82e907ff7bfa1e7dc980d0253d Mon Sep 17 00:00:00 2001 From: Tomas Kukosa Date: Wed, 12 Jun 2013 09:03:21 +0000 Subject: [PATCH] Fix wrong offset in H.235 tokens causing malformed packet exception svn path=/trunk/; revision=49899 --- asn1/h235/h235.cnf | 10 +++++----- epan/dissectors/packet-h235.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/asn1/h235/h235.cnf b/asn1/h235/h235.cnf index e852cc4112..323e814376 100644 --- a/asn1/h235/h235.cnf +++ b/asn1/h235/h235.cnf @@ -58,29 +58,29 @@ NonStandardParameter/data TYPE = FT_UINT32 DISPLAY = BASE_DEC #.FN_HDR SIGNED proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); #.END #.FN_HDR ENCRYPTED proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); #.END #.FN_HDR HASHED proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); #.END #.FN_HDR ClearToken proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); #.END #.FN_HDR CryptoToken proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); #.END diff --git a/epan/dissectors/packet-h235.c b/epan/dissectors/packet-h235.c index c9f07a5219..4eb7d3bf68 100644 --- a/epan/dissectors/packet-h235.c +++ b/epan/dissectors/packet-h235.c @@ -557,7 +557,7 @@ int dissect_h235_ENCRYPTED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 65 "../../asn1/h235/h235.cnf" proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -589,7 +589,7 @@ int dissect_h235_SIGNED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 60 "../../asn1/h235/h235.cnf" proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -754,7 +754,7 @@ int dissect_h235_ClearToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 76 "../../asn1/h235/h235.cnf" proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -775,7 +775,7 @@ int dissect_h235_HASHED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 70 "../../asn1/h235/h235.cnf" proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -851,7 +851,7 @@ int dissect_h235_CryptoToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 82 "../../asn1/h235/h235.cnf" proto_item *hidden_item; - hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, ENC_NA); + hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset>>3, 0, ENC_NA); PROTO_ITEM_SET_HIDDEN(hidden_item); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,