If data is NULL, the bug, if any, is not with *this* dissector, but with whichever one failed to pass the data properly.

svn path=/trunk/; revision=53706
This commit is contained in:
Chris Maynard 2013-12-02 02:07:42 +00:00
parent a9900375b4
commit 42a64c3557
2 changed files with 14 additions and 20 deletions

View File

@ -166,6 +166,10 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* do we have spdu type from the session dissector? */
if( data == NULL){
return 0;
}
/* first, try to check length */
/* do we have at least 2 bytes */
@ -175,13 +179,6 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
"User data");
return 0; /* no, it isn't a ACSE PDU */
}
/* do we have spdu type from the session dissector? */
if( data == NULL){
if(parent_tree){
REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
}
return 0;
}
session = ( (struct SESSION_DATA_STRUCTURE*)data);
if(session->spdu_type == 0 ) {

View File

@ -1708,6 +1708,10 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* do we have spdu type from the session dissector? */
if( data == NULL){
return 0;
}
/* first, try to check length */
/* do we have at least 2 bytes */
@ -1717,13 +1721,6 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
"User data");
return 0; /* no, it isn't a ACSE PDU */
}
/* do we have spdu type from the session dissector? */
if( data == NULL){
if(parent_tree){
REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
}
return 0;
}
session = ( (struct SESSION_DATA_STRUCTURE*)data);
if(session->spdu_type == 0 ) {
@ -2242,7 +2239,7 @@ void proto_register_acse(void) {
NULL, HFILL }},
/*--- End of included file: packet-acse-hfarr.c ---*/
#line 271 "../../asn1/acse/packet-acse-template.c"
#line 268 "../../asn1/acse/packet-acse-template.c"
};
/* List of subtrees */
@ -2288,7 +2285,7 @@ void proto_register_acse(void) {
&ett_acse_Authentication_value,
/*--- End of included file: packet-acse-ettarr.c ---*/
#line 277 "../../asn1/acse/packet-acse-template.c"
#line 274 "../../asn1/acse/packet-acse-template.c"
};
static ei_register_info ei[] = {