(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/funnel_stat.c) |
| |
| 152 | | | |
| 153 | | | static funnel_text_window_t* new_text_window(const gchar* title) { |
| 154 | | | funnel_text_window_t* tw = g_malloc(sizeof(funnel_text_window_t)); |
| 155 | | | GtkWidget *txt_scrollw, *main_vb, *hbox; |
| 156 | | | |
| 157 | | | tw->close_cb = NULL; |
| 158 | | | tw->close_data = NULL; |
| 159 | | | tw->buttons = g_ptr_array_new(); |
| 160 | | | |
| 161 | | | tw->win = window_new(GTK_WINDOW_TOPLEVEL,title); |
| 162 | | | g_signal_connect(tw->win, "delete-event", G_CALLBACK(text_window_delete_event_cb), tw);
x /usr/include/glib-2.0/gobject/gsignal.h |
| |
421 | #define g_signal_connect(instance, detailed_signal, c_handler, data) \ |
422 | g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) |
| |
x /usr/include/glib-2.0/gobject/gclosure.h |
| |
72 | #define G_CALLBACK(f) ((GCallback) (f)) |
| |
|
Dangerous Function Cast
Casting text_window_delete_event_cb to this new type could lead to unsafe program behavior. - The function return types have different sizes.
- The previous return type was int which has size 4.
- The new return type is void which has size 0.
|
|
| 163 | | | |
| 164 | | | txt_scrollw = scrolled_window_new(NULL, NULL); |
| 165 | | | main_vb = gtk_vbox_new(FALSE, 3); |
| 166 | | | gtk_container_set_border_width(GTK_CONTAINER(main_vb), 6);
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
42 | #define GTK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
41 | #define GTK_TYPE_CONTAINER (gtk_container_get_type ()) |
| |
|
| 167 | | | gtk_container_add(GTK_CONTAINER(tw->win), main_vb);
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
42 | #define GTK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
41 | #define GTK_TYPE_CONTAINER (gtk_container_get_type ()) |
| |
|
| 168 | | | |
| 169 | | | gtk_container_add(GTK_CONTAINER(main_vb), txt_scrollw);
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
42 | #define GTK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtkcontainer.h |
| |
41 | #define GTK_TYPE_CONTAINER (gtk_container_get_type ()) |
| |
|
| 170 | | | |
| 171 | | | gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(txt_scrollw),
x /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h |
| |
44 | #define GTK_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindow)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtkscrolledwindow.h |
| |
43 | #define GTK_TYPE_SCROLLED_WINDOW (gtk_scrolled_window_get_type ()) |
| |
|
| 172 | | | GTK_SHADOW_IN); |
| |