Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at rawlog.c:387

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

main

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/util/rawlog.c)expand/collapse
Show more  
 342  int main(int argc, char *argv[], char *envp[])
 343  {
 344          char *executable, *p;
 345          enum rawlog_flags flags;
 346   
 347          flags = RAWLOG_FLAG_LOG_INPUT | RAWLOG_FLAG_LOG_OUTPUT;
 348   
 349          lib_init();
 350          i_set_failure_internal();
 351          process_title_init(argv, envp);
 352   
 353          argc--;
 354          argv++;
 355          while (argc > 0 && *argv[0] == '-') {
 356                  if (strcmp(argv[0], "-i") == 0)
 357                          flags &= ~RAWLOG_FLAG_LOG_OUTPUT;
 358                  else if (strcmp(argv[0], "-o") == 0)
 359                          flags &= ~RAWLOG_FLAG_LOG_INPUT;
 360                  else if (strcmp(argv[0], "-b") == 0)
 361                          flags |= RAWLOG_FLAG_LOG_BOUNDARIES;
 362                  else {
 363                          argc = 0;
 364                          break;
 365                  }
 366                  argc--;
 367                  argv++;
 368          }
 369   
 370          if (argc < 1)
 371                  i_fatal("Usage: rawlog [-i | -o] [-b] <binary> <arguments>");
 372   
 373          executable = argv[0];
 374          if (strstr(executable, "/imap") != NULL)
 375                  flags |= RAWLOG_FLAG_LOG_TIMESTAMPS;
 376   
 377          rawlog_open(flags);
 378   
 379          /* hide the executable path, it's ugly */
 380          p = strrchr(argv[0], '/');
 381          if (p != NULL) argv[0] = p+1;
 382          execv(executable, argv);
 383   
 384          i_fatal_status(FATAL_EXEC, "execv(%s) failed: %m", executable);
 385   
 386          /* not reached */
 387          return FATAL_EXEC;
 388  }
Show more  




Change Warning 8034.25018 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: