(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c) |
| |
| 832 | | | static const guint8* |
| 833 | | | ensure_contiguous_no_exception(tvbuff_t *tvb, gint offset, gint length, |
| 834 | | | int *exception) |
| 835 | | | { |
| 836 | | | guint abs_offset, abs_length; |
| 837 | | | |
| 838 | | | if (!check_offset_length_no_exception(tvb, offset, length, |
| 839 | | | &abs_offset, &abs_length, exception)) { |
| 840 | | | return NULL; |
| 841 | | | } |
| 842 | | | |
| 843 | | | |
| 844 | | | |
| 845 | | | |
| 846 | | | |
| 847 | | | if (tvb->real_data) { |
| 848 | | | return tvb->real_data + abs_offset; |
| 849 | | | } |
| 850 | | | else { |
| 851 | | | switch(tvb->type) { |
| 852 | | | case TVBUFF_REAL_DATA: |
| 853 | | | 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)) |
| |
|
| 854 | | | case TVBUFF_SUBSET: |
| 855 | | | return ensure_contiguous_no_exception(tvb->tvbuffs.subset.tvb, |
| 856 | | | abs_offset - tvb->tvbuffs.subset.offset, |
| 857 | | | abs_length, NULL); |
| 858 | | | case TVBUFF_COMPOSITE: |
| 859 | | | return composite_ensure_contiguous_no_exception(tvb, abs_offset, abs_length); |
| 860 | | | } |
| 861 | | | } |
| 862 | | | |
| 863 | | | 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)) |
| |
|
| 864 | | | return NULL; |
Unreachable Computation
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 865 | | | } |
| |