(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c) |
| |
| 868 | | | static const guint8* |
| 869 | | | fast_ensure_contiguous(tvbuff_t *tvb, gint offset, guint length) |
| 870 | | | { |
| 871 | | | guint end_offset; |
| 872 | | | guint u_offset; |
| 873 | | | |
| 874 | | | DISSECTOR_ASSERT(tvb && tvb->initialized);
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)) |
| |
|
| 875 | | | if (offset < 0 || !tvb->real_data) { |
| 876 | | | return ensure_contiguous(tvb, offset, length); |
| 877 | | | } |
| 878 | | | |
| 879 | | | u_offset = offset; |
| 880 | | | end_offset = u_offset + length; |
| 881 | | | |
| 882 | | | |
| 883 | | | |
| 884 | | | if (end_offset <= tvb->length) { |
| 885 | | | return tvb->real_data + u_offset; |
| 886 | | | } |
| 887 | | | |
| 888 | | | if (end_offset > tvb->reported_length) { |
| 889 | | | THROW(ReportedBoundsError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 890 | | | } |
| 891 | | | THROW(BoundsError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 892 | | | |
| 893 | | | return 0; |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. |
|
| 894 | | | } |
| |