(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/main.c) |
| |
| 1768 | | | main(int argc, char *argv[]) |
| 1769 | | | { |
| 1770 | | | char *init_progfile_dir_error; |
| 1771 | | | char *s; |
| 1772 | | | int opt; |
| 1773 | | | extern char *optarg; |
| 1774 | | | gboolean arg_error = FALSE; |
| 1775 | | | |
| 1776 | | | extern int splash_register_freq; |
| 1777 | | | const gchar *filter; |
| 1778 | | | |
| 1779 | | | #ifdef _WIN32 |
| 1780 | | | WSADATA wsaData; |
| 1781 | | | #endif |
| 1782 | | | |
| 1783 | | | char *rf_path; |
| 1784 | | | int rf_open_errno; |
| 1785 | | | char *gdp_path, *dp_path; |
| 1786 | | | int err; |
| 1787 | | | #ifdef HAVE_LIBPCAP |
| 1788 | | | gboolean start_capture = FALSE; |
| 1789 | | | gboolean list_link_layer_types = FALSE; |
| 1790 | | | #else |
| 1791 | | | gboolean capture_option_specified = FALSE; |
| 1792 | | | #endif |
| 1793 | | | gint pl_size = 280, tv_size = 95, bv_size = 75; |
| 1794 | | | gchar *rc_file, *cf_name = NULL, *rfilter = NULL; |
| 1795 | | | dfilter_t *rfcode = NULL; |
| 1796 | | | gboolean rfilter_parse_failed = FALSE; |
| 1797 | | | e_prefs *prefs; |
| 1798 | | | char badopt; |
| 1799 | | | GtkWidget *splash_win = NULL; |
| 1800 | | | gpointer priv_warning_dialog; |
| 1801 | | | GLogLevelFlags log_flags; |
| 1802 | | | guint go_to_packet = 0; |
| 1803 | | | int optind_initial; |
| 1804 | | | int status; |
| 1805 | | | gchar *cur_user, *cur_group; |
| 1806 | | | |
| 1807 | | | #ifdef _WIN32 |
| 1808 | | | #ifdef HAVE_AIRPCAP |
| 1809 | | | char *err_str; |
| 1810 | | | #endif |
| 1811 | | | #endif |
| 1812 | | | |
| 1813 | | | #define OPTSTRING_INIT "a:b:c:C:Df:g:Hhi:kK:lLm:nN:o:P:pQr:R:Ss:t:vw:X:y:z:" |
| 1814 | | | |
| 1815 | | | #if defined HAVE_LIBPCAP && defined _WIN32 |
| 1816 | | | #define OPTSTRING_WIN32 "B:" |
| 1817 | | | #else |
| 1818 | | | #define OPTSTRING_WIN32 "" |
| 1819 | | | #endif |
| 1820 | | | |
| 1821 | | | char optstring[sizeof(OPTSTRING_INIT) + sizeof(OPTSTRING_WIN32) - 1] =
x /home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/main.c |
| |
1813 | #define OPTSTRING_INIT "a:b:c:C:Df:g:Hhi:kK:lLm:nN:o:P:pQr:R:Ss:t:vw:X:y:z:" |
| |
|
| 1822 | | | OPTSTRING_INIT OPTSTRING_WIN32;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/main.c |
| |
1813 | #define OPTSTRING_INIT "a:b:c:C:Df:g:Hhi:kK:lLm:nN:o:P:pQr:R:Ss:t:vw:X:y:z:" |
| |
|
| 1823 | | | |
| 1824 | | | |
| 1825 | | | |
| 1826 | | | |
| 1827 | | | |
| 1828 | | | |
| 1829 | | | get_credential_info(); |
| 1830 | | | relinquish_special_privs_perm(); |
| 1831 | | | |
| 1832 | | | |
| 1833 | | | |
| 1834 | | | |
| 1835 | | | init_progfile_dir_error = init_progfile_dir(argv[0], main); |
| 1836 | | | |
| 1837 | | | |
| 1838 | | | initialize_funnel_ops(); |
| 1839 | | | |
| 1840 | | | #ifdef HAVE_AIRPDCAP |
| 1841 | | | AirPDcapInitContext(&airpdcap_ctx); |
| 1842 | | | #endif |
| 1843 | | | |
| 1844 | | | #ifdef _WIN32 |
| 1845 | | | |
| 1846 | | | load_wpcap(); |
| 1847 | | | |
| 1848 | | | |
| 1849 | | | wpcap_packet_load(); |
| 1850 | | | |
| 1851 | | | #ifdef HAVE_AIRPCAP |
| 1852 1887 |  | | [ Lines 1852 to 1887 omitted. ] |
| 1888 | | | break; |
| 1889 | | | #endif |
| 1890 | | | } |
| 1891 | | | #endif |
| 1892 | | | |
| 1893 | | | |
| 1894 | | | WSAStartup( MAKEWORD( 1, 1 ), &wsaData ); |
| 1895 | | | #endif |
| 1896 | | | |
| 1897 | | | |
| 1898 | | | comp_info_str = g_string_new("Compiled "); |
| 1899 | | | |
| 1900 | | | g_string_append(comp_info_str, "with "); |
| 1901 | | | g_string_append_printf(comp_info_str, |
| 1902 | | | #ifdef GTK_MAJOR_VERSION |
| 1903 | | | "GTK+ %d.%d.%d", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, |
| 1904 | | | GTK_MICRO_VERSION); |
| 1905 | | | #else |
| 1906 | | | "GTK+ (version unknown)"); |
| 1907 | | | #endif |
| 1908 | | | g_string_append(comp_info_str, ", "); |
| 1909 | | | |
| 1910 | | | get_compiled_version_info(comp_info_str, get_gui_compiled_info); |
| 1911 | | | |
| 1912 | | | |
| 1913 | | | runtime_info_str = g_string_new("Running "); |
| 1914 | | | get_runtime_version_info(runtime_info_str, get_gui_runtime_info); |
| 1915 | | | |
| 1916 | | | |
| 1917 | | | |
| 1918 | [+] | | recent_read_static(&rf_path, &rf_open_errno); |
 |
| 1919 | | | if (rf_path != NULL && rf_open_errno != 0) { |
Event 10:
Skipping " if". rf_path != (void *)0 evaluates to false.
hide
|
|
| 1920 | | | simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, |
| 1921 | | | "Could not open common recent file\n\"%s\": %s.", |
| 1922 | | | rf_path, strerror(rf_open_errno)); |
| 1923 | | | } |
| 1924 | | | |
| 1925 | | | |
| 1926 | | | |
| 1927 | | | |
| 1928 | | | |
| 1929 | | | |
| 1930 | | | |
| 1931 | | | |
| 1932 | | | |
| 1933 | | | |
| 1934 | | | |
| 1935 | | | |
| 1936 | | | opterr = 0; |
| 1937 | | | optind_initial = optind; |
| 1938 | | | while ((opt = getopt(argc, argv, optstring)) != -1) { |
Event 11:
Leaving loop. (opt = getopt(...)) != -1 evaluates to false.
hide
|
|
| 1939 | | | switch (opt) { |
| 1940 | | | case 'C': |
| 1941 | | | if (profile_exists (optarg)) { |
| 1942 | | | set_profile_name (optarg); |
| 1943 | | | } else { |
| 1944 | | | cmdarg_err("Configuration Profile \"%s\" does not exist", optarg); |
| 1945 | | | exit(1); |
| 1946 | | | } |
| 1947 | | | break; |
| 1948 | | | case 'h': |
| 1949 1973 |  | | [ Lines 1949 to 1973 omitted. ] |
| 1974 | | | |
| 1975 | | | ex_opt_add(optarg); |
| 1976 | | | break; |
| 1977 | | | case '?': |
| 1978 | | | break; |
| 1979 | | | } |
| 1980 | | | } |
| 1981 | | | |
| 1982 | | | |
| 1983 | | | |
| 1984 | [+][+] | | set_last_open_dir(get_persdatafile_dir()); |
 |
 |
| |