Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/omnievents-2.6.2/examples/channel.cc
Examining data/omnievents-2.6.2/examples/pullcons.cc
Examining data/omnievents-2.6.2/examples/pullsupp.cc
Examining data/omnievents-2.6.2/examples/pushcons.cc
Examining data/omnievents-2.6.2/examples/pushsupp.cc
Examining data/omnievents-2.6.2/idl/COS_sysdep.h
Examining data/omnievents-2.6.2/src/config.h
Examining data/omnievents-2.6.2/src/Callback.h
Examining data/omnievents-2.6.2/src/ConsumerAdmin.cc
Examining data/omnievents-2.6.2/src/ConsumerAdmin.h
Examining data/omnievents-2.6.2/src/EventChannel.cc
Examining data/omnievents-2.6.2/src/EventChannel.h
Examining data/omnievents-2.6.2/src/EventChannelFactory.cc
Examining data/omnievents-2.6.2/src/EventChannelFactory.h
Examining data/omnievents-2.6.2/src/EventQueue.cc
Examining data/omnievents-2.6.2/src/EventQueue.h
Examining data/omnievents-2.6.2/src/Filter.cc
Examining data/omnievents-2.6.2/src/Filter.h
Examining data/omnievents-2.6.2/src/Mapper.h
Examining data/omnievents-2.6.2/src/Orb.cc
Examining data/omnievents-2.6.2/src/Orb.h
Examining data/omnievents-2.6.2/src/PersistNode.h
Examining data/omnievents-2.6.2/src/ProxyManager.cc
Examining data/omnievents-2.6.2/src/ProxyManager.h
Examining data/omnievents-2.6.2/src/ProxyPullConsumer.cc
Examining data/omnievents-2.6.2/src/ProxyPullConsumer.h
Examining data/omnievents-2.6.2/src/ProxyPullSupplier.cc
Examining data/omnievents-2.6.2/src/ProxyPullSupplier.h
Examining data/omnievents-2.6.2/src/ProxyPushConsumer.cc
Examining data/omnievents-2.6.2/src/ProxyPushConsumer.h
Examining data/omnievents-2.6.2/src/ProxyPushSupplier.cc
Examining data/omnievents-2.6.2/src/ProxyPushSupplier.h
Examining data/omnievents-2.6.2/src/Servant.h
Examining data/omnievents-2.6.2/src/SupplierAdmin.cc
Examining data/omnievents-2.6.2/src/SupplierAdmin.h
Examining data/omnievents-2.6.2/src/daemon.h
Examining data/omnievents-2.6.2/src/daemon_unix.h
Examining data/omnievents-2.6.2/src/daemon_windows.cc
Examining data/omnievents-2.6.2/src/daemon_windows.h
Examining data/omnievents-2.6.2/src/defaults.h
Examining data/omnievents-2.6.2/src/gethostname.h
Examining data/omnievents-2.6.2/src/getopt.cc
Examining data/omnievents-2.6.2/src/getopt.h
Examining data/omnievents-2.6.2/src/main.h
Examining data/omnievents-2.6.2/src/naming.cc
Examining data/omnievents-2.6.2/src/naming.h
Examining data/omnievents-2.6.2/src/omniEvents.cc
Examining data/omnievents-2.6.2/src/omniEvents.h
Examining data/omnievents-2.6.2/src/omniEventsLog.cc
Examining data/omnievents-2.6.2/src/omniEventsLog.h
Examining data/omnievents-2.6.2/src/scour.h
Examining data/omnievents-2.6.2/src/version.cc
Examining data/omnievents-2.6.2/src/version.h
Examining data/omnievents-2.6.2/src/PersistNode.cc
Examining data/omnievents-2.6.2/src/Servant.cc
Examining data/omnievents-2.6.2/src/daemon_unix.cc
Examining data/omnievents-2.6.2/src/main.cc
Examining data/omnievents-2.6.2/tools/events.cc
Examining data/omnievents-2.6.2/tools/eventc.cc
Examining data/omnievents-2.6.2/tools/eventf.cc
Examining data/omnievents-2.6.2/tools/rmeventc.cc
Examining data/omnievents-2.6.2/win32/config.h
Examining data/omnievents-2.6.2/win32/hello.cc

FINAL RESULTS:

data/omnievents-2.6.2/src/gethostname.h:103:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(hostname,un.nodename);
data/omnievents-2.6.2/src/omniEventsLog.cc:668:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(filename,"%s%s%s%s%s",logdir,sep,logname,hostname,ext);
data/omnievents-2.6.2/examples/pullcons.cc:184:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"td:rs:n:h")) != EOF)
data/omnievents-2.6.2/examples/pullsupp.cc:226:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"d:s:n:h")) != EOF)
data/omnievents-2.6.2/examples/pushcons.cc:228:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"hd:s:n:")) != EOF)
data/omnievents-2.6.2/examples/pushsupp.cc:186:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"d:rs:n:h")) != EOF)
data/omnievents-2.6.2/src/getopt.cc:88:5:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
int getopt(int argc, char *argv[], const char *optionS)
data/omnievents-2.6.2/src/getopt.h:65:5:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
int getopt(int argc, char *argv[], const char *optionS);
data/omnievents-2.6.2/src/main.cc:100:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"O:a:p:l:P:N:dft:vVh")) != EOF)
data/omnievents-2.6.2/src/omniEventsLog.cc:437:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *itbc = getenv("OMNIEVENTS_ITBC");
data/omnievents-2.6.2/src/omniEventsLog.cc:614:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      logdir=getenv(OMNIEVENTS_LOGDIR_ENV_VAR);
data/omnievents-2.6.2/tools/eventc.cc:213:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"n:N:m:c:i:p:q:R:r:t:vh")) != EOF)
data/omnievents-2.6.2/tools/eventf.cc:78:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((c = getopt(argc,argv,"h")) != EOF)
data/omnievents-2.6.2/tools/events.cc:310:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"shn:")) != EOF)
data/omnievents-2.6.2/tools/rmeventc.cc:78:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((c = getopt(argc,argv,"n:h")) != EOF)
data/omnievents-2.6.2/examples/pullcons.cc:191:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 'd': discnum = atoi(optarg);
data/omnievents-2.6.2/examples/pullcons.cc:197:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 's': sleepInterval = atoi(optarg);
data/omnievents-2.6.2/examples/pullsupp.cc:230:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 'd': discnum = atoi(optarg);
data/omnievents-2.6.2/examples/pullsupp.cc:233:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 's': sleepInterval = atoi(optarg);
data/omnievents-2.6.2/examples/pushcons.cc:232:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 'd': discnum = atoi(optarg);
data/omnievents-2.6.2/examples/pushcons.cc:235:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 's': sleepInterval = atoi(optarg);
data/omnievents-2.6.2/examples/pushsupp.cc:190:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 'd': discnum = atoi(optarg);
data/omnievents-2.6.2/examples/pushsupp.cc:196:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 's': sleepInterval = atoi(optarg);
data/omnievents-2.6.2/src/PersistNode.cc:146:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/omnievents-2.6.2/src/PersistNode.cc:147:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buf,"%i",value);
data/omnievents-2.6.2/src/PersistNode.cc:169:14:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      return atol(pos->second.c_str());
data/omnievents-2.6.2/src/Servant.cc:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[128];
data/omnievents-2.6.2/src/Servant.cc:81:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf,"%lx.%d.%lx",++count,mypid,sec);
data/omnievents-2.6.2/src/daemon_unix.cc:448:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int newfd =::open(filename,flags,0644);
data/omnievents-2.6.2/src/daemon_windows.cc:92:60:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  RegistryKey(HKEY hkey, bool open=true):_hkey(hkey),_open(open){}
data/omnievents-2.6.2/src/daemon_windows.cc:387:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char exe_file_name[MAX_PATH];
data/omnievents-2.6.2/src/main.cc:110:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        case 'p': port=atoi(optarg);
data/omnievents-2.6.2/src/main.cc:207:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char endPoint[64];
data/omnievents-2.6.2/src/main.cc:208:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(endPoint,"giop:::%d",port);
data/omnievents-2.6.2/src/main.cc:226:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(argv[2], "%d", port);
data/omnievents-2.6.2/src/omniEventsLog.cc:254:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char str[29];
data/omnievents-2.6.2/src/omniEventsLog.cc:619:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hostname[MAXHOSTNAMELEN];
data/omnievents-2.6.2/src/omniEventsLog.cc:630:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char last( logdir[strlen(logdir)-1] );
data/omnievents-2.6.2/src/omniEventsLog.cc:696:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      s.open(filename,openmodeflags,0644);
data/omnievents-2.6.2/src/omniEventsLog.cc:698:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      s.open(filename,openmodeflags);
data/omnievents-2.6.2/src/omniEventsLog.cc:707:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      int localFd = open(filename, O_WRONLY | flags, 0644);
data/omnievents-2.6.2/tools/eventc.cc:461:48:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  criteria[criteriaLen-1].value<<=CORBA::ULong(atol(value));
data/omnievents-2.6.2/tools/events.cc:259:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/omnievents-2.6.2/src/daemon_unix.cc:182:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  ::umask(0);
data/omnievents-2.6.2/src/daemon_unix.cc:463:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t bytes =::read(_pipe[PIPE_READ],&status,sizeof(status));
data/omnievents-2.6.2/src/daemon_windows.cc:141:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      1+::strlen(data)
data/omnievents-2.6.2/src/gethostname.h:101:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( uname(&un)==0 && strlen(un.nodename)<len)
data/omnievents-2.6.2/src/omniEventsLog.cc:267:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(&str[1], p, 24);
data/omnievents-2.6.2/src/omniEventsLog.cc:630:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char last( logdir[strlen(logdir)-1] );
data/omnievents-2.6.2/src/omniEventsLog.cc:644:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (logdir[strlen(logdir)-1] != '/')
data/omnievents-2.6.2/src/omniEventsLog.cc:666:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(logdir)+strlen(sep)+strlen(logname)+strlen(hostname)+strlen(ext);
data/omnievents-2.6.2/src/omniEventsLog.cc:666:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(logdir)+strlen(sep)+strlen(logname)+strlen(hostname)+strlen(ext);
data/omnievents-2.6.2/src/omniEventsLog.cc:666:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(logdir)+strlen(sep)+strlen(logname)+strlen(hostname)+strlen(ext);
data/omnievents-2.6.2/src/omniEventsLog.cc:666:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(logdir)+strlen(sep)+strlen(logname)+strlen(hostname)+strlen(ext);
data/omnievents-2.6.2/src/omniEventsLog.cc:666:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(logdir)+strlen(sep)+strlen(logname)+strlen(hostname)+strlen(ext);
data/omnievents-2.6.2/tools/events.cc:61:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#  define read(fd,buf,count)  _read(fd,buf,count)
data/omnievents-2.6.2/tools/events.cc:264:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(_connected && (len=read(STDIN_FILENO,buf,1024)))

ANALYSIS SUMMARY:

Hits = 57
Lines analyzed = 13059 in approximately 0.45 seconds (29236 lines/second)
Physical Source Lines of Code (SLOC) = 7815
Hits@level = [0]   2 [1]  14 [2]  28 [3]  13 [4]   2 [5]   0
Hits@level+ = [0+]  59 [1+]  57 [2+]  43 [3+]  15 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 7.54958 [1+] 7.29367 [2+] 5.50224 [3+] 1.91939 [4+] 0.255918 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.