(/home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c) |
| |
| 94 | | | color_filters_add_tmp(GSList **cfl) |
| 95 | | | { |
| 96 | | | gchar *name = NULL; |
| 97 | | | guint32 i; |
| 98 | | | gchar** bg_colors; |
| 99 | | | gchar** fg_colors; |
| 100 | | | unsigned long int cval; |
| 101 | | | color_t bg_color, fg_color; |
| 102 | | | color_filter_t *colorf; |
| 103 | | | |
| 104 | | | g_assert(strlen(prefs.gui_colorized_fg)==69);
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
74 | #define g_assert(expr) do { if G_LIKELY (expr) ; else \ |
75 | g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ |
76 | #expr); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
277 | #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
268 | #define _G_BOOLEAN_EXPR(expr) \ |
269 | __extension__ ({ \ |
270 | int _g_boolean_var_; \ |
271 | if (expr) \ |
272 | _g_boolean_var_ = 1; \ |
273 | else \ |
274 | _g_boolean_var_ = 0; \ |
275 | _g_boolean_var_; \ |
276 | }) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
Event 1:
Taking true branch. strlen(...) == 69 evaluates to true.
hide
Event 2:
Skipping " if". __builtin_expect(...) evaluates to true.
hide
Event 3:
Leaving loop. 0 evaluates to false.
hide
|
|
| 105 | | | g_assert(strlen(prefs.gui_colorized_bg)==69);
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
74 | #define g_assert(expr) do { if G_LIKELY (expr) ; else \ |
75 | g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ |
76 | #expr); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
277 | #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
268 | #define _G_BOOLEAN_EXPR(expr) \ |
269 | __extension__ ({ \ |
270 | int _g_boolean_var_; \ |
271 | if (expr) \ |
272 | _g_boolean_var_ = 1; \ |
273 | else \ |
274 | _g_boolean_var_ = 0; \ |
275 | _g_boolean_var_; \ |
276 | }) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
Event 4:
Taking true branch. strlen(...) == 69 evaluates to true.
hide
Event 5:
Skipping " if". __builtin_expect(...) evaluates to true.
hide
Event 6:
Leaving loop. 0 evaluates to false.
hide
|
|
| 106 | | | fg_colors = g_strsplit(prefs.gui_colorized_fg, ",", -1); |
| 107 | | | bg_colors = g_strsplit(prefs.gui_colorized_bg, ",", -1); |
| 108 | | | |
| 109 | | | for ( i=1 ; i<=10 ; i++ ) { |
Event 9:
Entering loop body. i <= 10 evaluates to true.
hide
|
|
| 110 | | | name = g_strdup_printf("%s%02d",TEMP_COLOR_PREFIX,i); |
| 111 | | | |
| 112 | | | |
| 113 | | | cval = strtoul(fg_colors[i-1], NULL, 16); |
| 114 | | | initialize_color(&fg_color, RED_COMPONENT(cval),
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
48 | #define RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255)) |
| |
|
| 115 | | | GREEN_COMPONENT(cval),
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
49 | #define GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255)) |
| |
|
| 116 | | | BLUE_COMPONENT(cval) );
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
50 | #define BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255)) |
| |
|
| 117 | | | cval = strtoul(bg_colors[i-1], NULL, 16); |
| 118 | | | initialize_color(&bg_color, RED_COMPONENT(cval),
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
48 | #define RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255)) |
| |
|
| 119 | | | GREEN_COMPONENT(cval),
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
49 | #define GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255)) |
| |
|
| 120 | [+] | | BLUE_COMPONENT(cval) );
x /home/sate/Testcases/c/cve/wireshark-1.2.0/color_filters.c |
| |
50 | #define BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255)) |
| |
|
Event 11:
initialize_color() does not initialize bg_color. - This may be because of a failure case or other special case for initialize_color().
hide
|
|
 |
| 121 | [+] | | colorf = color_filter_new(name, NULL, &bg_color, &fg_color, TRUE); |
Event 13:
!0 evaluates to true.
hide
Event 14:
&bg_color is passed to color_filter_new() as the third argument.
hide
Event 15:
color_filter_new() does not initialize bg_color. - This may be because of a failure case or other special case for color_filter_new().
hide
|
|
 |
| |