Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at capture_opts.c:411

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

capture_opts_add_iface_opt

(/home/sate/Testcases/c/cve/wireshark-1.2.0/capture_opts.c)expand/collapse
Show more  
 373  capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg)
 374  {
 375      long        adapter_index;
 376      char        *p;
 377      GList       *if_list;
 378      if_info_t   *if_info;
 379      int         err;
 380      gchar       *err_str;
 381   
 382   
 383      /*
 384       * If the argument is a number, treat it as an index into the list
 385       * of adapters, as printed by "tshark -D".
 386       *
 387       * This should be OK on UNIX systems, as interfaces shouldn't have 
 388       * names that begin with digits.  It can be useful on Windows, where 
 389       * more than one interface can have the same name.
 390       */
 391      adapter_index = strtol(optarg, &p, 10);
 392      if (p != NULL && *p == '\0') {
 393        if (adapter_index < 0) {
 394          cmdarg_err("The specified adapter index is a negative number");
 395          return 1;
 396        }
 397        if (adapter_index > INT_MAX) {
 398          cmdarg_err("The specified adapter index is too large (greater than %d)",
 399              INT_MAX);
 400          return 1;
 401        }
 402        if (adapter_index == 0) {
 403          cmdarg_err("There is no interface with that adapter index");
 404          return 1;
 405        }
 406[+]       if_list = get_interface_list(&err, &err_str);
 407        if (if_list == NULL) {
 408          switch (err) {
 409   
 410          case CANT_GET_INTERFACE_LIST:
 411              cmdarg_err("%s", err_str);
Show more  




Change Warning 4173.30236 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: