aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dop.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 22:23:44 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 22:23:44 +0000
commit79fa0d0a3fa8ebb91fac92fda1274957fc55bcd4 (patch)
tree9a714a0dfd512884ae08640817e2783d528d0bf3 /epan/dissectors/packet-dop.c
parente3c369eb6786e8f17e3e8ce6da027012511566b8 (diff)
Reject the packet if data is NULL without doing anything else.
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors. Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT(). svn path=/trunk/; revision=53895
Diffstat (limited to 'epan/dissectors/packet-dop.c')
-rw-r--r--epan/dissectors/packet-dop.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c
index ee56b73368..1731ff5e99 100644
--- a/epan/dissectors/packet-dop.c
+++ b/epan/dissectors/packet-dop.c
@@ -2091,18 +2091,12 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
const char *dop_op_name;
asn1_ctx_t asn1_ctx;
- asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
-
- /* do we have operation information from the ROS dissector? */
- if( data == NULL ){
- if(parent_tree){
- proto_tree_add_text(parent_tree, tvb, offset, -1,
- "Internal error: can't get operation information from ROS dissector.");
- }
- return 0;
- }
+ /* do we have operation information from the ROS dissector? */
+ if (data == NULL)
+ return 0;
+ session = (struct SESSION_DATA_STRUCTURE*)data;
- session = ( (struct SESSION_DATA_STRUCTURE*)data );
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_dop);
@@ -2971,7 +2965,7 @@ void proto_register_dop(void) {
NULL, HFILL }},
/*--- End of included file: packet-dop-hfarr.c ---*/
-#line 248 "../../asn1/dop/packet-dop-template.c"
+#line 242 "../../asn1/dop/packet-dop-template.c"
};
/* List of subtrees */
@@ -3050,7 +3044,7 @@ void proto_register_dop(void) {
&ett_dop_GrantsAndDenials,
/*--- End of included file: packet-dop-ettarr.c ---*/
-#line 255 "../../asn1/dop/packet-dop-template.c"
+#line 249 "../../asn1/dop/packet-dop-template.c"
};
static ei_register_info ei[] = {
@@ -3113,7 +3107,7 @@ void proto_reg_handoff_dop(void) {
/*--- End of included file: packet-dop-dis-tab.c ---*/
-#line 295 "../../asn1/dop/packet-dop-template.c"
+#line 289 "../../asn1/dop/packet-dop-template.c"
/* APPLICATION CONTEXT */
oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3");