(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-iax2.c) |
| |
| 693 | | | static iax_call_data *iax_lookup_call_from_dest( guint src_circuit_id, |
| 694 | | | guint dst_circuit_id, |
| 695 | | | guint , |
| 696 | | | gboolean *reversed_p) |
| 697 | | | { |
| 698 | | | circuit_t *dst_circuit; |
| 699 | | | iax_call_data * iax_call; |
| 700 | | | gboolean reversed = FALSE; |
| 701 | | | |
| 702 | | | dst_circuit = find_circuit( CT_IAX2, |
| 703 | | | dst_circuit_id, |
| 704 | | | ); |
| 705 | | | |
| 706 | | | if( !dst_circuit ) { |
| 707 | | | #ifdef DEBUG_HASHING |
| 708 | | | g_debug( "++ destination circuit not found, must have missed NEW packet" ); |
| 709 | | | #endif |
| 710 | | | if( reversed_p ) |
| 711 | | | *reversed_p = FALSE; |
| 712 | | | return NULL; |
| 713 | | | } |
| 714 | | | |
| 715 | | | #ifdef DEBUG_HASHING |
| 716 | | | g_debug( "++ found destination circuit" ); |
| 717 | | | #endif |
| 718 | | | |
| 719 | | | iax_call = (iax_call_data *)circuit_get_proto_data(dst_circuit,proto_iax2); |
| 720 | | | |
| 721 | | | |
| 722 | | | |
| 723 | | | DISSECTOR_ASSERT(iax_call);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
117 | #define DISSECTOR_ASSERT(expression) \ |
118 | ((void) ((expression) ? (void)0 : \ |
119 | __DISSECTOR_ASSERT (expression, __FILE__, __LINE__))) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
138 | #define __DISSECTOR_ASSERT(expression, file, lineno) \ |
139 | (REPORT_DISSECTOR_BUG( \ |
140 | ep_strdup_printf("%s:%u: failed assertion \"%s\"", \ |
141 | file, lineno, __DISSECTOR_ASSERT_STRINGIFY(expression)))) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
106 | #define REPORT_DISSECTOR_BUG(message) \ |
107 | ((getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) ? \ |
108 | abort() : \ |
109 | THROW_MESSAGE(DissectorError, message)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
226 | #define THROW_MESSAGE(x, y) \ |
227 | except_throw(XCEPT_GROUP_WIRESHARK, (x), (y)) |
| |
|
| 724 | | | |
| 725 | | | if( is_forward_circuit(dst_circuit_id, iax_call )) { |
| 726 | | | #ifdef DEBUG_HASHING |
| 727 | | | g_debug( "++ destination circuit matches forward_circuit_id of call, " |
| 728 | | | "therefore packet is reversed" ); |
| 729 | | | #endif |
| 730 | | | |
| 731 | | | reversed = TRUE; |
| 732 | | | |
| 733 | | | if( iax_call -> n_reverse_circuit_ids == 0 ) { |
| 734 | | | |
| 735 | | | |
| 736 | | | |
| 737 | | | #ifdef DEBUG_HASHING |
| 738 | | | g_debug( "++ reverse_circuit_id of call is zero, need to create a " |
| 739 | | | "new reverse circuit for this call" ); |
| 740 | | | #endif |
| 741 | | | |
| 742 | | | iax2_new_circuit_for_call( src_circuit_id, , iax_call, TRUE ); |
| 743 | | | #ifdef DEBUG_HASHING |
| 744 | | | g_debug( "++ done" ); |
| 745 | | | #endif |
| 746 | | | } else if( !is_reverse_circuit(src_circuit_id, iax_call )) { |
| 747 | | | g_warning( "IAX Packet %u from circuit ids %u->%u "
x /usr/include/glib-2.0/glib/gmessages.h |
| |
153 | #define g_warning(...) g_log (G_LOG_DOMAIN, \ |
154 | G_LOG_LEVEL_WARNING, \ |
155 | __VA_ARGS__) |
| |
|
| 748 | | | "conflicts with earlier call with circuit ids %u->%u", |
| 749 | | | , |
| 750 | | | src_circuit_id,dst_circuit_id, |
| 751 | | | iax_call->forward_circuit_ids[0], |
| 752 | | | iax_call->reverse_circuit_ids[0]); |
| 753 | | | return NULL; |
| 754 | | | } |
| 755 | | | } else if ( is_reverse_circuit(dst_circuit_id, iax_call)) { |
| 756 | | | #ifdef DEBUG_HASHING |
| 757 | | | g_debug( "++ destination circuit matches reverse_circuit_id of call, " |
| 758 | | | "therefore packet is forward" ); |
| 759 | | | #endif |
| 760 | | | |
| 761 | | | reversed = FALSE; |
Useless Assignment
This code assigns the variable the same value it already had. |
|
| 762 | | | if( !is_forward_circuit(src_circuit_id, iax_call)) { |
| 763 | | | g_warning( "IAX Packet %u from circuit ids %u->%u "
x /usr/include/glib-2.0/glib/gmessages.h |
| |
153 | #define g_warning(...) g_log (G_LOG_DOMAIN, \ |
154 | G_LOG_LEVEL_WARNING, \ |
155 | __VA_ARGS__) |
| |
|
| 764 | | | "conflicts with earlier call with circuit ids %u->%u", |
| 765 | | | , |
| 766 | | | src_circuit_id,dst_circuit_id, |
| 767 | | | iax_call->forward_circuit_ids[0], |
| 768 | | | iax_call->reverse_circuit_ids[0]); |
| 769 | | | if( reversed_p ) |
| 770 | | | *reversed_p = FALSE; |
| 771 | | | return NULL; |
| 772 | | | } |
| 773 | | | } else { |
| 774 | | | DISSECTOR_ASSERT_NOT_REACHED();
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
131 | #define DISSECTOR_ASSERT_NOT_REACHED() \ |
132 | (REPORT_DISSECTOR_BUG( \ |
133 | ep_strdup_printf("%s:%u: failed assertion \"DISSECTOR_ASSERT_NOT_REACHED\"", \ |
134 | __FILE__, __LINE__))) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.h |
| |
106 | #define REPORT_DISSECTOR_BUG(message) \ |
107 | ((getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) ? \ |
108 | abort() : \ |
109 | THROW_MESSAGE(DissectorError, message)) |
| |
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
226 | #define THROW_MESSAGE(x, y) \ |
227 | except_throw(XCEPT_GROUP_WIRESHARK, (x), (y)) |
| |
|
| 775 | | | } |
| 776 | | | |
| 777 | | | if( reversed_p ) |
| 778 | | | *reversed_p = reversed; |
| 779 | | | |
| 780 | | | return iax_call; |
| 781 | | | } |
| |