(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ldap.c) |
| |
| 3347 | | | dissect_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_mscldap) |
| 3348 | | | { |
| 3349 | | | int offset = 0; |
| 3350 | | | conversation_t *conversation; |
| 3351 | | | gboolean doing_sasl_security = FALSE; |
| 3352 | | | guint length_remaining; |
| 3353 | | | ldap_conv_info_t *ldap_info = NULL; |
| 3354 | | | proto_item *ldap_item = NULL; |
| 3355 | | | proto_tree *ldap_tree = NULL; |
| 3356 | | | |
| 3357 | | | ldm_tree = NULL; |
| 3358 | | | |
| 3359 | | | |
| 3360 | | | |
| 3361 | | | |
| 3362 | | | conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, |
| 3363 | | | pinfo->ptype, pinfo->srcport, |
| 3364 | [+] | | pinfo->destport, 0); |
 |
| 3365 | | | if (conversation == NULL) { |
Event 8:
Skipping " if". conversation == (void *)0 evaluates to false.
hide
|
|
| 3366 | | | |
| 3367 | | | conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, |
| 3368 | | | pinfo->ptype, pinfo->srcport, |
| 3369 | | | pinfo->destport, 0); |
| 3370 | | | |
| 3371 | | | } |
| 3372 | | | |
| 3373 | | | |
| 3374 | | | |
| 3375 | | | |
| 3376 | [+] | | ldap_info = conversation_get_proto_data(conversation, proto_ldap); |
 |
| 3377 | | | if (ldap_info == NULL) { |
Event 11:
Skipping " if". ldap_info == (void *)0 evaluates to false.
hide
|
|
| 3378 | | | |
| 3379 | | | |
| 3380 | | | |
| 3381 | | | ldap_info = g_malloc(sizeof(ldap_conv_info_t)); |
| 3382 | | | ldap_info->auth_type = 0; |
| 3383 | | | ldap_info->auth_mech = 0; |
| 3384 | | | ldap_info->first_auth_frame = 0; |
| 3385 | | | ldap_info->matched=g_hash_table_new(ldap_info_hash_matched, ldap_info_equal_matched); |
| 3386 | | | ldap_info->unmatched=g_hash_table_new(ldap_info_hash_unmatched, ldap_info_equal_unmatched); |
| 3387 | | | ldap_info->num_results = 0; |
| 3388 | | | ldap_info->start_tls_frame = 0; |
| 3389 | | | ldap_info->start_tls_pending = FALSE; |
| 3390 | | | |
| 3391 | | | conversation_add_proto_data(conversation, proto_ldap, ldap_info); |
| 3392 | | | |
| 3393 | | | ldap_info->next = ldap_info_items; |
| 3394 | | | ldap_info_items = ldap_info; |
| 3395 | | | |
| 3396 | | | } |
| 3397 | | | |
| 3398 | | | switch (ldap_info->auth_type) { |
Event 12:
ldap_info->auth_type evaluates to 3.
hide
|
|
| 3399 | | | case LDAP_AUTH_SASL: |
| 3400 | | | |
| 3401 | | | |
| 3402 | | | |
| 3403 | | | if (ldap_info->first_auth_frame != 0 && |
Event 13:
Skipping " if". ldap_info->first_auth_frame != 0 evaluates to false.
hide
|
|
| 3404 | | | pinfo->fd->num >= ldap_info->first_auth_frame) { |
| 3405 | | | doing_sasl_security = TRUE; |
| 3406 | | | } |
| 3407 | | | } |
| 3408 | | | |
| 3409 | | | length_remaining = tvb_ensure_length_remaining(tvb, offset); |
| 3410 | | | |
| 3411 | | | |
| 3412 | | | |
| 3413 | | | |
| 3414 | | | |
| 3415 | | | |
| 3416 | [+] | | if(!doing_sasl_security && (tvb_bytes_exist(tvb, offset, 5)) |
Event 14:
Skipping " if". doing_sasl_security evaluates to false.
hide
|
|
 |
| 3417 | [+] | | &&(tvb_get_ntohl(tvb, offset)<=(guint)(tvb_reported_length_remaining(tvb, offset)-4)) |
 |
| |