diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2012-11-07 00:00:57 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2012-11-07 00:00:57 +0000 |
commit | 6d044f3281e8f7ae42d8be320590038257e6dca3 (patch) | |
tree | f6558dcfa253e9ead81a6790807c4cc4ed028fda | |
parent | ad4dc9dfcd9fedd207bfb593f366e8b6b7672ffb (diff) |
Avoid accessing a no more valid tvbuff
svn path=/trunk/; revision=45957
-rw-r--r-- | asn1/rrc/packet-rrc-template.c | 3 | ||||
-rw-r--r-- | asn1/rrc/rrc.cnf | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.c | 30 |
3 files changed, 30 insertions, 12 deletions
diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index d6fc15e84b..ab8726552b 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -133,8 +133,7 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { }; static int flowd,type; -static tvbuff_t * hrnti; -static tvbuff_t * start_val; +static tvbuff_t * hrnti = NULL; static int cipher_start_val[2] _U_; /*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf index b762c40583..0f9e3a65bf 100644 --- a/asn1/rrc/rrc.cnf +++ b/asn1/rrc/rrc.cnf @@ -750,6 +750,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE %(DEFAULT_BODY)s #.FN_BODY START-Value VAL_PTR = &start_val + tvbuff_t * start_val; fp_info *fpinf; rrc_ciphering_info * c_inf; int i; @@ -838,5 +839,13 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE #.FN_BODY DL-DCCH-MessageType VAL_PTR = &msg_type %(DEFAULT_BODY)s +#.FN_BODY DL-DCCH-Message +%(DEFAULT_BODY)s + hrnti = NULL; + +#.FN_BODY HandoverToUTRANCommand +%(DEFAULT_BODY)s + hrnti = NULL; + #.END diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 6e1c62ab74..00690104d5 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -14800,8 +14800,7 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { }; static int flowd,type; -static tvbuff_t * hrnti; -static tvbuff_t * start_val; +static tvbuff_t * hrnti = NULL; static int cipher_start_val[2] _U_; /*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ @@ -15086,7 +15085,7 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 829 "../../asn1/rrc/rrc.cnf" +#line 830 "../../asn1/rrc/rrc.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 32U, &rbid, FALSE); @@ -15103,7 +15102,7 @@ dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_rrc_RLC_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 835 "../../asn1/rrc/rrc.cnf" +#line 836 "../../asn1/rrc/rrc.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4095U, &activation_frame, FALSE); @@ -15123,7 +15122,7 @@ static const per_sequence_t RB_ActivationTimeInfo_sequence[] = { static int dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 808 "../../asn1/rrc/rrc.cnf" +#line 809 "../../asn1/rrc/rrc.cnf" fp_info *fpinf; rrc_ciphering_info * c_inf; @@ -80081,7 +80080,7 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = { static int dissect_rrc_DL_DCCH_MessageType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 839 "../../asn1/rrc/rrc.cnf" +#line 840 "../../asn1/rrc/rrc.cnf" offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice, &msg_type); @@ -80101,9 +80100,14 @@ static const per_sequence_t DL_DCCH_Message_sequence[] = { static int dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 843 "../../asn1/rrc/rrc.cnf" offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence); + hrnti = NULL; + + + return offset; } @@ -80112,6 +80116,7 @@ dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 753 "../../asn1/rrc/rrc.cnf" + tvbuff_t * start_val; fp_info *fpinf; rrc_ciphering_info * c_inf; int i; @@ -104877,10 +104882,15 @@ static const per_choice_t HandoverToUTRANCommand_choice[] = { static int dissect_rrc_HandoverToUTRANCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 847 "../../asn1/rrc/rrc.cnf" offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice, NULL); + hrnti = NULL; + + + return offset; } @@ -131077,7 +131087,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-rrc-fn.c ---*/ -#line 181 "../../asn1/rrc/packet-rrc-template.c" +#line 180 "../../asn1/rrc/packet-rrc-template.c" #include "packet-rrc.h" @@ -166650,7 +166660,7 @@ void proto_register_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 261 "../../asn1/rrc/packet-rrc-template.c" +#line 260 "../../asn1/rrc/packet-rrc-template.c" { &hf_test, { "RAB Test", "rrc.RAB.test", FT_UINT8, BASE_DEC, NULL, 0, @@ -172290,7 +172300,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 287 "../../asn1/rrc/packet-rrc-template.c" +#line 286 "../../asn1/rrc/packet-rrc-template.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, }; @@ -172370,7 +172380,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 301 "../../asn1/rrc/packet-rrc-template.c" +#line 300 "../../asn1/rrc/packet-rrc-template.c" |