(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-cmip.c) |
| |
| 4395 | | | dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) |
| 4396 | | | { |
| 4397 | | | static struct SESSION_DATA_STRUCTURE* session = NULL; |
| 4398 | | | proto_item *item = NULL; |
| 4399 | | | proto_tree *tree = NULL; |
| 4400 | | | asn1_ctx_t asn1_ctx; |
| 4401 | | | asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); |
| 4402 | | | |
| 4403 | | | |
| 4404 | | | |
| 4405 | | | if( !pinfo->private_data ){ |
| 4406 | | | if(tree){ |
| 4407 | | | proto_tree_add_text(tree, tvb, 0, -1, |
| 4408 | | | "Internal error:can't get spdu type from session dissector."); |
| 4409 | | | return; |
| 4410 | | | } |
| 4411 | | | } else { |
| 4412 | | | session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) ); |
| 4413 | | | if(session->spdu_type == 0 ){ |
| 4414 | | | if(tree){ |
| 4415 | | | proto_tree_add_text(tree, tvb, 0, -1, |
| 4416 | | | "Internal error:wrong spdu type %x from session dissector.",session->spdu_type); |
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 4417 | | | return; |
| 4418 | | | } |
| 4419 | | | } |
| 4420 | | | } |
| 4421 | | | |
| 4422 | | | if(parent_tree){ |
| 4423 | | | item = proto_tree_add_item(parent_tree, proto_cmip, tvb, 0, -1, FALSE); |
| 4424 | | | tree = proto_item_add_subtree(item, ett_cmip); |
| 4425 | | | } |
| 4426 | | | |
| 4427 | | | if (check_col(pinfo->cinfo, COL_PROTOCOL)) |
| 4428 | | | col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMIP"); |
| 4429 | | | if (check_col(pinfo->cinfo, COL_INFO)) |
| 4430 | | | col_clear(pinfo->cinfo, COL_INFO); |
| 4431 | | | switch(session->spdu_type){ |
| 4432 | | | case SES_CONNECTION_REQUEST: |
| 4433 | | | case SES_CONNECTION_ACCEPT: |
| 4434 | | | case SES_DISCONNECT: |
| 4435 | | | case SES_FINISH: |
| 4436 | | | case SES_REFUSE: |
| 4437 | | | dissect_cmip_CMIPUserInfo(FALSE,tvb,0,&asn1_ctx,tree,-1); |
| 4438 | | | break; |
| 4439 | | | case SES_ABORT: |
| 4440 | | | dissect_cmip_CMIPAbortInfo(FALSE,tvb,0,&asn1_ctx,tree,-1); |
| 4441 | | | break; |
| 4442 | | | case SES_DATA_TRANSFER: |
| 4443 | | | dissect_cmip_ROS(FALSE,tvb,0,&asn1_ctx,tree,-1); |
| 4444 | | | break; |
| 4445 | | | default: |
| 4446 | | | ; |
| 4447 | | | } |
| 4448 | | | } |
| |