(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c) |
| |
| 492 | | | free_GPtrArray_value(gpointer key, gpointer value, gpointer user_data _U_) |
| 493 | | | { |
| 494 | | | GPtrArray *ptrs = value; |
| 495 | | | gint hfid = (gint)(long)key; |
| 496 | | | *hfinfo; |
| 497 | | | |
| 498 | | | |
| 499 | | | PROTO_REGISTRAR_GET_NTH(hfid, hfinfo);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c |
| |
272 | #define PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo) \ |
273 | DISSECTOR_ASSERT((guint)hfindex < gpa_hfinfo.len); \ |
274 | hfinfo=gpa_hfinfo.hfi[hfindex]; |
| |
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)) |
| |
|
| 500 | | | if(hfinfo->ref_count){ |
| 501 | | | |
| 502 | | | |
| 503 | | | |
| 504 | | | |
| 505 | | | if( (hfinfo->parent != -1) && (hfinfo->ref_count) ){ |
Redundant Condition
hfinfo->ref_count always evaluates to true. This may be because: - There is a constant assignment to one or more of the variables involved.
- An earlier conditional statement has already ensured that hfinfo->ref_count cannot be false.
- A crashing bug occurs on every path where hfinfo->ref_count could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 506 | | | *parent_hfinfo; |
| 507 | | | PROTO_REGISTRAR_GET_NTH(hfinfo->parent, parent_hfinfo);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c |
| |
272 | #define PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo) \ |
273 | DISSECTOR_ASSERT((guint)hfindex < gpa_hfinfo.len); \ |
274 | hfinfo=gpa_hfinfo.hfi[hfindex]; |
| |
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)) |
| |
|
| 508 | | | parent_hfinfo->ref_count -= hfinfo->ref_count; |
| 509 | | | } |
| 510 | | | hfinfo->ref_count = 0; |
| 511 | | | } |
| 512 | | | |
| 513 | | | g_ptr_array_free(ptrs, TRUE); |
| 514 | | | } |
| |