(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbuff.c) |
| |
| 391 | | | check_offset_length_no_exception(tvbuff_t *tvb, gint offset, gint length, |
| 392 | | | guint *offset_ptr, guint *length_ptr, int *exception) |
| 393 | | | { |
| 394 | | | guint end_offset; |
| 395 | | | |
| 396 | | | 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)) |
| |
|
| 397 | | | |
| 398 | | | if (!compute_offset_length(tvb, offset, length, offset_ptr, length_ptr, exception)) { |
| 399 | | | return FALSE; |
| 400 | | | } |
| 401 | | | |
| 402 | | | |
| 403 | | | |
| 404 | | | |
| 405 | | | end_offset = *offset_ptr + *length_ptr; |
| 406 | | | |
| 407 | | | |
| 408 | | | |
| 409 | | | |
| 410 | | | |
| 411 | | | |
| 412 | | | if (end_offset < *offset_ptr) |
| 413 | | | end_offset = UINT_MAX; |
| 414 | | | |
| 415 | | | |
| 416 | | | |
| 417 | | | |
| 418 | | | |
| 419 | | | |
| 420 | | | |
| 421 | | | |
| 422 | | | if (end_offset <= tvb->length) { |
| 423 | | | return TRUE; |
| 424 | | | } |
| 425 | | | else if (end_offset <= tvb->reported_length) { |
| 426 | | | if (exception) { |
| 427 | | | *exception = BoundsError; |
| 428 | | | } |
| 429 | | | return FALSE; |
| 430 | | | } |
| 431 | | | else { |
| 432 | | | if (exception) { |
| 433 | | | *exception = ReportedBoundsError; |
| 434 | | | } |
| 435 | | | return FALSE; |
| 436 | | | } |
| 437 | | | |
| 438 | | | 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)) |
| |
|
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 439 | | | } |
| |