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/hopm-1.1.9/src/compat.c
Examining data/hopm-1.1.9/src/compat.h
Examining data/hopm-1.1.9/src/config-lexer.c
Examining data/hopm-1.1.9/src/config-parser.c
Examining data/hopm-1.1.9/src/config-parser.h
Examining data/hopm-1.1.9/src/config.c
Examining data/hopm-1.1.9/src/config.h
Examining data/hopm-1.1.9/src/dnsbl.c
Examining data/hopm-1.1.9/src/dnsbl.h
Examining data/hopm-1.1.9/src/firedns.c
Examining data/hopm-1.1.9/src/firedns.h
Examining data/hopm-1.1.9/src/irc.c
Examining data/hopm-1.1.9/src/irc.h
Examining data/hopm-1.1.9/src/libopm/src/config.c
Examining data/hopm-1.1.9/src/libopm/src/config.h
Examining data/hopm-1.1.9/src/libopm/src/libopm.c
Examining data/hopm-1.1.9/src/libopm/src/libopm.h
Examining data/hopm-1.1.9/src/libopm/src/list.c
Examining data/hopm-1.1.9/src/libopm/src/list.h
Examining data/hopm-1.1.9/src/libopm/src/memory.c
Examining data/hopm-1.1.9/src/libopm/src/memory.h
Examining data/hopm-1.1.9/src/libopm/src/opm.h
Examining data/hopm-1.1.9/src/libopm/src/opm_common.h
Examining data/hopm-1.1.9/src/libopm/src/opm_error.h
Examining data/hopm-1.1.9/src/libopm/src/opm_types.h
Examining data/hopm-1.1.9/src/libopm/src/proxy.c
Examining data/hopm-1.1.9/src/libopm/src/proxy.h
Examining data/hopm-1.1.9/src/list.c
Examining data/hopm-1.1.9/src/list.h
Examining data/hopm-1.1.9/src/log.c
Examining data/hopm-1.1.9/src/log.h
Examining data/hopm-1.1.9/src/main.c
Examining data/hopm-1.1.9/src/main.h
Examining data/hopm-1.1.9/src/match.c
Examining data/hopm-1.1.9/src/match.h
Examining data/hopm-1.1.9/src/memory.c
Examining data/hopm-1.1.9/src/memory.h
Examining data/hopm-1.1.9/src/misc.c
Examining data/hopm-1.1.9/src/misc.h
Examining data/hopm-1.1.9/src/negcache.c
Examining data/hopm-1.1.9/src/negcache.h
Examining data/hopm-1.1.9/src/opercmd.c
Examining data/hopm-1.1.9/src/opercmd.h
Examining data/hopm-1.1.9/src/options.h
Examining data/hopm-1.1.9/src/patchlevel.h
Examining data/hopm-1.1.9/src/patricia.c
Examining data/hopm-1.1.9/src/patricia.h
Examining data/hopm-1.1.9/src/scan.c
Examining data/hopm-1.1.9/src/scan.h
Examining data/hopm-1.1.9/src/stats.c
Examining data/hopm-1.1.9/src/stats.h

FINAL RESULTS:

data/hopm-1.1.9/src/config-parser.c:1099:21:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define YYFPRINTF fprintf
data/hopm-1.1.9/src/dnsbl.c:283:14:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  FILE *fp = popen(cmdbuf, "w");
data/hopm-1.1.9/src/irc.c:952:17:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  ssize_t len = vsnprintf(buf, sizeof(buf), data, arglist);
data/hopm-1.1.9/src/irc.c:998:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, sizeof(buf), data, arglist);
data/hopm-1.1.9/src/libopm/src/memory.c:70:3:  [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(ret, s);
data/hopm-1.1.9/src/log.c:82:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(buf, sizeof(buf), fmt, args);
data/hopm-1.1.9/src/log.h:31:65:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
extern void log_printf(const char *, ...) __attribute__((format(printf,1,2)));
data/hopm-1.1.9/src/main.c:246:11:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if (execv(HOPM_BINPATH, argv) == -1)
data/hopm-1.1.9/src/memory.c:70:3:  [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(ret, s);
data/hopm-1.1.9/src/firedns.c:168:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand((unsigned int)time(NULL));
data/hopm-1.1.9/src/main.c:107:13:  [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 c = getopt(argc, argv, "dc:");
data/hopm-1.1.9/src/config-lexer.c:911:1:  [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 linebuf[512];
data/hopm-1.1.9/src/config-lexer.c:912:1:  [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 conffilebuf[512];
data/hopm-1.1.9/src/config-lexer.c:919: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 conffile[512];
data/hopm-1.1.9/src/config-lexer.c:1267:19:  [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).
{ yylval.number = atoi(yytext); return NUMBER; }
data/hopm-1.1.9/src/config-lexer.c:2850: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 filenamebuf[512];
data/hopm-1.1.9/src/config-lexer.c:2869:25:  [2] (misc) fopen:
  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).
  FILE *tmp_fbfile_in = fopen(filenamebuf, "r");
data/hopm-1.1.9/src/config-parser.c:1349: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/hopm-1.1.9/src/config-parser.c:1544: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 yymsgbuf[128];
data/hopm-1.1.9/src/config.c:86:15:  [2] (misc) fopen:
  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).
  conf_file = fopen(filename, "r");
data/hopm-1.1.9/src/config.h:29:8:  [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.
extern char linebuf[512];
data/hopm-1.1.9/src/config.h:30:8:  [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.
extern char conffilebuf[512];
data/hopm-1.1.9/src/dnsbl.c:52: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 lookup[128];
data/hopm-1.1.9/src/dnsbl.c:130: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 text_type[128] = "";
data/hopm-1.1.9/src/dnsbl.c:262: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[2048], cmdbuf[256];
data/hopm-1.1.9/src/firedns.c:97:12:  [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.
  unsigned char id[2];
data/hopm-1.1.9/src/firedns.c:105: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 lookup[256];
data/hopm-1.1.9/src/firedns.c:122:12:  [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.
  unsigned char id[2];
data/hopm-1.1.9/src/firedns.c:142:12:  [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.
  unsigned char payload[512];
data/hopm-1.1.9/src/firedns.c:162: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[1024];
data/hopm-1.1.9/src/firedns.c:173:7:  [2] (misc) fopen:
  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).
  f = fopen(FDNS_CONFIG_PREF, "r");
data/hopm-1.1.9/src/firedns.c:177:9:  [2] (misc) fopen:
  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).
    f = fopen(FDNS_CONFIG_FBCK, "r");
data/hopm-1.1.9/src/firedns.c:201:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&servers6[i6++], &addr6, sizeof(struct in6_addr));
data/hopm-1.1.9/src/firedns.c:209:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&servers4[i4++], &addr4, sizeof(struct in_addr));
data/hopm-1.1.9/src/firedns.c:225:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&servers6[i6++], &addr6, sizeof(struct in6_addr));
data/hopm-1.1.9/src/firedns.c:233:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&servers4[i4++], &addr4, sizeof(struct in_addr));
data/hopm-1.1.9/src/firedns.c:264:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(header->payload, &input[12], l);
data/hopm-1.1.9/src/firedns.c:282:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&output[12], header->payload, l);
data/hopm-1.1.9/src/firedns.c:441:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&payload[payloadpos], tempchr2, l);
data/hopm-1.1.9/src/firedns.c:454:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&payload[payloadpos], tempchr2, l);
data/hopm-1.1.9/src/firedns.c:463:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&payload[payloadpos], &l, 2);
data/hopm-1.1.9/src/firedns.c:466:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&payload[payloadpos + 2], &l, 2);
data/hopm-1.1.9/src/firedns.c:478:12:  [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.
  unsigned char payload[sizeof(struct s_header)];
data/hopm-1.1.9/src/firedns.c:576:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(addr6.sin6_addr.s6_addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12);
data/hopm-1.1.9/src/firedns.c:577:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&addr6.sin6_addr.s6_addr[12], &servers4[i].s_addr, 4);
data/hopm-1.1.9/src/firedns.c:622:12:  [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.
  unsigned char buffer[sizeof(struct s_header)];
data/hopm-1.1.9/src/firedns.c:772:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(result.text, &h.payload[i], rr.rdlength);
data/hopm-1.1.9/src/firedns.h:68: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 text[1024];
data/hopm-1.1.9/src/firedns.h:69: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 lookup[256];
data/hopm-1.1.9/src/irc.c:63:8:  [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.
static char         IRC_RAW[MSGLENMAX];  /* Buffer to read data into               */
data/hopm-1.1.9/src/irc.c:69:8:  [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.
static char IRC_SVR_STR[INET6_ADDRSTRLEN];
data/hopm-1.1.9/src/irc.c:290:9:  [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.
  const char *user[4];
data/hopm-1.1.9/src/irc.c:307:7:  [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 errmsg[256];
data/hopm-1.1.9/src/irc.c:433:10:  [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.
  static char name[MSGLENMAX];
data/hopm-1.1.9/src/irc.c:740: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        *parv[17];
data/hopm-1.1.9/src/irc.c:743: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         msg[MSGLENMAX];  /* Temporarily stores IRC msg to pass to handlers */
data/hopm-1.1.9/src/irc.c:949: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[MSGLENMAX];
data/hopm-1.1.9/src/irc.c:995: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[MSGLENMAX];
data/hopm-1.1.9/src/libopm/src/config.c:210:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(addr, res->ai_addr, res->ai_addrlen);
data/hopm-1.1.9/src/libopm/src/libopm.c:427:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&scan->addr, res->ai_addr, res->ai_addrlen);
data/hopm-1.1.9/src/libopm/src/libopm.c:1080: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 readbuf[LIBOPM_TLS_RECORD_SIZE];
data/hopm-1.1.9/src/libopm/src/libopm.h:44: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               readbuf[READBUFLEN + 1]; /* 128 byte read buffer, anything over 128 is probably not of use */
data/hopm-1.1.9/src/libopm/src/proxy.c:40:8:  [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.
static char SENDBUF[SENDBUFLEN + 1];
data/hopm-1.1.9/src/log.c:41:13:  [2] (misc) fopen:
  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).
  logfile = fopen(filename, "a");
data/hopm-1.1.9/src/log.c:59:17:  [2] (misc) fopen:
  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).
  scanlogfile = fopen(filename, "a");
data/hopm-1.1.9/src/log.c:75: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[LOG_BUFSIZE];
data/hopm-1.1.9/src/main.c:161:14:  [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 fd = open("/dev/null", O_RDWR);
data/hopm-1.1.9/src/main.c:188:12:  [2] (misc) fopen:
  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).
  pidout = fopen(OptionsItem.pidfile, "w");
data/hopm-1.1.9/src/misc.c:33:10:  [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.
  static char buf[32];
data/hopm-1.1.9/src/misc.c:55:10:  [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.
  static char buf[32];  /* 32 = sizeof("9999999999999999 days, 23:59:59") */
data/hopm-1.1.9/src/patricia.c:70:38:  [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.
    if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned char *)dest)[n] & m))
data/hopm-1.1.9/src/patricia.c:70:74:  [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.
    if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned char *)dest)[n] & m))
data/hopm-1.1.9/src/patricia.c:83:10:  [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.
  static char buf[INET6_ADDRSTRLEN + sizeof("/128")];
data/hopm-1.1.9/src/patricia.c:93: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 + strlen(buf), "/%d", prefix->bitlen);
data/hopm-1.1.9/src/patricia.c:120:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&prefix->add.sin6, dest, addr_size);
data/hopm-1.1.9/src/patricia.c:140: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 save[INET6_ADDRSTRLEN];
data/hopm-1.1.9/src/patricia.c:172:14:  [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).
    bitlen = atoi(cp + 1);
data/hopm-1.1.9/src/patricia.c:175:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(save, string, length);
data/hopm-1.1.9/src/scan.c:318: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 hostmask[MSGLENMAX];
data/hopm-1.1.9/src/scan.c:319: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 addrmask[MSGLENMAX];
data/hopm-1.1.9/src/scan.c:736: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 message[MSGLENMAX] = "";  /* OUTPUT */
data/hopm-1.1.9/src/scan.c:819: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[INET6_ADDRSTRLEN];
data/hopm-1.1.9/src/compat.c:69:19:  [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).
    return dlen + strlen(src);
data/hopm-1.1.9/src/config-lexer.c:931:57:  [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).
  return fgets(lbuf, max_size, conf_file) == NULL ? 0 : strlen(lbuf);
data/hopm-1.1.9/src/config-lexer.c:1049:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/hopm-1.1.9/src/config-lexer.c:2596:37:  [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).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/hopm-1.1.9/src/config-parser.c:1247:47:  [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).
#   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
data/hopm-1.1.9/src/firedns.c:446:7:  [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).
  l = strlen(tempchr2);
data/hopm-1.1.9/src/irc.c:260:23:  [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).
    size_t nick_len = strlen(IRCItem.nick);
data/hopm-1.1.9/src/libopm/src/libopm.c:1165:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    switch (read(conn->fd, &c, 1))
data/hopm-1.1.9/src/libopm/src/memory.c:67:22:  [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).
  void *ret = malloc(strlen(s) + 1);
data/hopm-1.1.9/src/main.c:124:10:  [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).
  lenc = strlen(CONFDIR) + strlen(CONFNAME) + strlen(CONFEXT) + 3;
data/hopm-1.1.9/src/main.c:124:28:  [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).
  lenc = strlen(CONFDIR) + strlen(CONFNAME) + strlen(CONFEXT) + 3;
data/hopm-1.1.9/src/main.c:124:47:  [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).
  lenc = strlen(CONFDIR) + strlen(CONFNAME) + strlen(CONFEXT) + 3;
data/hopm-1.1.9/src/main.c:125:10:  [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).
  lenl = strlen(LOGDIR) + strlen(CONFNAME) + strlen(LOGEXT) + 3;
data/hopm-1.1.9/src/main.c:125:27:  [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).
  lenl = strlen(LOGDIR) + strlen(CONFNAME) + strlen(LOGEXT) + 3;
data/hopm-1.1.9/src/main.c:125:46:  [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).
  lenl = strlen(LOGDIR) + strlen(CONFNAME) + strlen(LOGEXT) + 3;
data/hopm-1.1.9/src/main.c:158:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(077);  /* umask 077: u=rwx,g=,o= */
data/hopm-1.1.9/src/memory.c:67:22:  [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).
  void *ret = malloc(strlen(s) + 1);
data/hopm-1.1.9/src/misc.c:89: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 *tmp = txt + strlen(txt) - 1;
data/hopm-1.1.9/src/patricia.c:93:19:  [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).
    sprintf(buf + strlen(buf), "/%d", prefix->bitlen);
data/hopm-1.1.9/src/scan.c:781: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).
            size = strlen(tab->data);

ANALYSIS SUMMARY:

Hits = 102
Lines analyzed = 15117 in approximately 0.44 seconds (34708 lines/second)
Physical Source Lines of Code (SLOC) = 9871
Hits@level = [0]  67 [1]  20 [2]  71 [3]   2 [4]   9 [5]   0
Hits@level+ = [0+] 169 [1+] 102 [2+]  82 [3+]  11 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 17.1209 [1+] 10.3333 [2+] 8.30716 [3+] 1.11438 [4+] 0.911762 [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.