(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c) |
| |
| 1009 | | | void* |
| 1010 | | | tvb_memcpy(tvbuff_t *tvb, void* target, gint offset, size_t length) |
| 1011 | | | { |
| 1012 | | | guint abs_offset, abs_length; |
| 1013 | | | |
| 1014 | | | |
| 1015 | | | |
| 1016 | | | |
| 1017 | | | |
| 1018 | | | |
| 1019 | | | |
| 1020 | | | |
| 1021 | | | |
| 1022 | | | |
| 1023 | | | |
| 1024 | | | |
| 1025 | | | DISSECTOR_ASSERT(length <= 0x7FFFFFFF);
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)) |
| |
|
| 1026 | | | check_offset_length(tvb, offset, (gint) length, &abs_offset, &abs_length); |
| 1027 | | | |
| 1028 | | | if (tvb->real_data) { |
| 1029 | | | return memcpy(target, tvb->real_data + abs_offset, abs_length); |
| 1030 | | | } |
| 1031 | | | |
| 1032 | | | switch(tvb->type) { |
| 1033 | | | case TVBUFF_REAL_DATA: |
| 1034 | | | 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)) |
| |
|
| 1035 | | | |
| 1036 | | | case TVBUFF_SUBSET: |
| 1037 | | | return tvb_memcpy(tvb->tvbuffs.subset.tvb, target, |
| 1038 | | | abs_offset - tvb->tvbuffs.subset.offset, |
| 1039 | | | abs_length); |
| 1040 | | | |
| 1041 | | | case TVBUFF_COMPOSITE: |
| 1042 | | | return composite_memcpy(tvb, target, offset, length); |
| 1043 | | | } |
| 1044 | | | |
| 1045 | | | 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)) |
| |
|
| 1046 | | | return NULL; |
Unreachable Computation
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 1047 | | | } |
| |