(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/conversation.c) |
| |
| 684 | | | conversation_t * |
| 685 | | | find_conversation(guint32 frame_num, address *addr_a, address *addr_b, port_type ptype, |
| 686 | | | guint32 port_a, guint32 port_b, guint options) |
| 687 | | | { |
| 688 | | | conversation_t *conversation; |
| 689 | | | |
| 690 | | | |
| 691 | | | |
| 692 | | | |
| 693 | | | if (!(options & (NO_ADDR_B|NO_PORT_B))) { |
Event 1:
Skipping " if". options & (1 | 2) evaluates to true.
hide
|
|
| 694 | | | |
| 695 | | | |
| 696 | | | |
| 697 | | | |
| 698 | | | |
| 699 | | | conversation = |
| 700 | | | conversation_lookup_hashtable(conversation_hashtable_exact, |
| 701 | | | frame_num, addr_a, addr_b, ptype, |
| 702 | | | port_a, port_b); |
| 703 | | | if ((conversation == NULL) && (addr_a->type == AT_FC)) { |
| 704 | | | |
| 705 | | | |
| 706 | | | |
| 707 | | | conversation = |
| 708 | | | conversation_lookup_hashtable(conversation_hashtable_exact, |
| 709 | | | frame_num, addr_b, addr_a, ptype, |
| 710 | | | port_a, port_b); |
| 711 | | | } |
| 712 | | | if (conversation != NULL) |
| 713 | | | return conversation; |
| 714 | | | } |
| 715 | | | |
| 716 | | | |
| 717 | | | |
| 718 | | | |
| 719 | | | |
| 720 | | | if (!(options & NO_PORT_B)) { |
Event 2:
Skipping " if". options & 2 evaluates to true.
hide
|
|
| 721 | | | |
| 722 | | | |
| 723 | | | |
| 724 | | | |
| 725 | | | |
| 726 | | | |
| 727 | | | |
| 728 | | | |
| 729 | | | |
| 730 | | | conversation = |
| 731 801 |  | | [ Lines 731 to 801 omitted. ] |
| 802 | | | } |
| 803 | | | return conversation; |
| 804 | | | } |
| 805 | | | } |
| 806 | | | } |
| 807 | | | |
| 808 | | | |
| 809 | | | |
| 810 | | | |
| 811 | | | |
| 812 | | | if (!(options & NO_ADDR_B)) { |
Event 3:
Taking true branch. options & 1 evaluates to false.
hide
|
|
| 813 | | | |
| 814 | | | |
| 815 | | | |
| 816 | | | |
| 817 | | | |
| 818 | | | |
| 819 | | | |
| 820 | | | |
| 821 | | | |
| 822 | | | conversation = |
| 823 | | | conversation_lookup_hashtable(conversation_hashtable_no_port2, |
| 824 | [+] | | frame_num, addr_a, addr_b, ptype, port_a, port_b); |
 |
| 825 | | | if ((conversation == NULL) && (addr_a->type == AT_FC)) { |
Event 8:
Skipping " if". conversation == (void *)0 evaluates to false.
hide
|
|
| 826 | | | |
| 827 | | | |
| 828 | | | |
| 829 | | | conversation = |
| 830 | | | conversation_lookup_hashtable(conversation_hashtable_no_port2, |
| 831 | | | frame_num, addr_b, addr_a, ptype, port_a, port_b); |
| 832 | | | } |
| 833 | | | if (conversation != NULL) { |
Event 9:
Taking true branch. conversation != (void *)0 evaluates to true.
hide
|
|
| 834 | | | |
| 835 | | | |
| 836 | | | |
| 837 | | | |
| 838 | | | |
| 839 | | | |
| 840 | | | |
| 841 | | | |
| 842 | | | |
| 843 | | | |
| 844 | | | |
| 845 | | | if (!(conversation->options & NO_PORT_B) && ptype != PT_UDP) |
| 846 | | | { |
| 847 | | | if(!(conversation->options & CONVERSATION_TEMPLATE)) |
Event 11:
Taking false branch. conversation->options & 8 evaluates to true.
hide
|
|
| 848 | | | { |
| 849 | | | conversation_set_port2(conversation, port_b); |
| 850 | | | } |
| 851 | | | else |
| 852 | | | { |
| 853 | | | conversation = |
| 854 | [+] | | conversation_create_from_template(conversation, 0, port_b); |
Event 12:
NULL is passed to conversation_create_from_template() as the second argument. - Dereferenced later, causing the null pointer dereference.
hide
|
|
 |
| |