Skip to content

Commit

Permalink
Don't intentionally use -1 as an hfindex: while only naughty before, …
Browse files Browse the repository at this point in the history
…with the

changes from r49644 you'll get complaints about the hf being unregistered...

Note that this code also intentionally passes -1 as an ett_index.  It doesn't
currently complain so I'm leaving it alone for now...

svn path=/trunk/; revision=49648
  • Loading branch information
Jeff Morriss committed May 31, 2013
1 parent eb8217a commit 813dcf7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion asn1/t124/packet-t124-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ dissect_t124_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
* to have a version of dissect_per_sequence() that checks all
* references to the tvbuff before making them and returning "no"
* if they would fail.
*
* We (ab)use hf_t124_connectGCCPDU here just to give a valid entry...
*/
TRY {
(void) dissect_per_sequence(tvb, 0, &asn1_ctx, NULL, -1, -1, t124Heur_sequence);
(void) dissect_per_sequence(tvb, 0, &asn1_ctx, NULL, hf_t124_connectGCCPDU, -1, t124Heur_sequence);
} CATCH_BOUNDS_ERRORS {
failed = TRUE;
} ENDTRY;
Expand Down
8 changes: 5 additions & 3 deletions epan/dissectors/packet-t124.c
Original file line number Diff line number Diff line change
Expand Up @@ -2973,9 +2973,11 @@ dissect_t124_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
* to have a version of dissect_per_sequence() that checks all
* references to the tvbuff before making them and returning "no"
* if they would fail.
*
* We (ab)use hf_t124_connectGCCPDU here just to give a valid entry...
*/
TRY {
(void) dissect_per_sequence(tvb, 0, &asn1_ctx, NULL, -1, -1, t124Heur_sequence);
(void) dissect_per_sequence(tvb, 0, &asn1_ctx, NULL, hf_t124_connectGCCPDU, -1, t124Heur_sequence);
} CATCH_BOUNDS_ERRORS {
failed = TRUE;
} ENDTRY;
Expand Down Expand Up @@ -3900,7 +3902,7 @@ void proto_register_t124(void) {
NULL, HFILL }},

/*--- End of included file: packet-t124-hfarr.c ---*/
#line 201 "../../asn1/t124/packet-t124-template.c"
#line 203 "../../asn1/t124/packet-t124-template.c"
};

/* List of subtrees */
Expand Down Expand Up @@ -4013,7 +4015,7 @@ void proto_register_t124(void) {
&ett_t124_DomainMCSPDU,

/*--- End of included file: packet-t124-ettarr.c ---*/
#line 208 "../../asn1/t124/packet-t124-template.c"
#line 210 "../../asn1/t124/packet-t124-template.c"
};

/* Register protocol */
Expand Down

0 comments on commit 813dcf7

Please sign in to comment.