(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/hostlist_table.c) |
| |
| 817 | | | gtk_clist_set_sort_type(hosttable->table, GTK_SORT_DESCENDING); |
| 818 | | | |
| 819 | | | for (i = 0; i < NUM_HOSTLIST_COLS; i++) { |
| 820 | | | gtk_clist_set_column_auto_resize(hosttable->table, i, TRUE); |
| 821 | | | } |
| 822 | | | |
| 823 | | | gtk_clist_set_shadow_type(hosttable->table, GTK_SHADOW_IN); |
| 824 | | | gtk_clist_column_titles_show(hosttable->table); |
| 825 | | | gtk_container_add(GTK_CONTAINER(hosttable->scrolled_window), (GtkWidget *)hosttable->table);
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 ()) |
| |
|
| 826 | | | |
| 827 | | | g_signal_connect(hosttable->table, "click-column", G_CALLBACK(hostlist_click_column_cb), col_arrows);
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 hostlist_click_column_cb to this new type could lead to unsafe program behavior. - There were previously 3 arguments, now there are 0.
|
|
| 828 | | | |
| 829 | | | hosttable->num_hosts=0; |
| 830 | | | hosttable->hosts=NULL; |
| 831 | | | |
| 832 | | | |
| 833 | | | if(hide_ports){ |
| 834 | | | gtk_clist_set_column_visibility(hosttable->table, 1, FALSE); |
| 835 | | | } |
| 836 | | | |
| 837 | | | #ifdef HAVE_GEOIP |
| |