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/skksearch-0.0/config.h
Examining data/skksearch-0.0/dic.c
Examining data/skksearch-0.0/dic_cdb.h
Examining data/skksearch-0.0/dic_db.h
Examining data/skksearch-0.0/dic_dummy.c
Examining data/skksearch-0.0/dic_dummy.h
Examining data/skksearch-0.0/dic_plain.h
Examining data/skksearch-0.0/err.c
Examining data/skksearch-0.0/err.h
Examining data/skksearch-0.0/dic.h
Examining data/skksearch-0.0/dic_cdb.c
Examining data/skksearch-0.0/dic_db.c
Examining data/skksearch-0.0/dic_plain.c
Examining data/skksearch-0.0/main.c

FINAL RESULTS:

data/skksearch-0.0/err.c:61:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf(errout, message, argp);
data/skksearch-0.0/main.c:75: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, "l:f:sic:t")) != EOF) {
data/skksearch-0.0/dic.h:18: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[DIC_BUFSIZE];
data/skksearch-0.0/dic_cdb.c:35:23:  [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).
  if ((internal->fd = open(path, O_RDONLY, 0)) < 0) {
data/skksearch-0.0/dic_db.c:36:17:  [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).
	|| (ret = env->open(env, NULL, 0, DB_USE_ENVIRON)) != 0) {
data/skksearch-0.0/dic_db.c:51:31:  [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).
      || (ret = internal->db->open(internal->db, NULL, path, NULL,
data/skksearch-0.0/dic_plain.c:42: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[DIC_BUFSIZE];
data/skksearch-0.0/dic_plain.c:49:23:  [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).
  if ((internal->fp = fopen(path, "r")) == NULL) {
data/skksearch-0.0/err.c:32:16:  [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).
      errout = fopen(logfile, "a");
data/skksearch-0.0/main.c:33: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 combuf[COMBUFSIZE];
data/skksearch-0.0/main.c:58: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 *entlist[MAXENTNUM];
data/skksearch-0.0/main.c:78:18:  [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).
      loglevel = atoi(optarg);
data/skksearch-0.0/main.c:117:6:  [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 line[1024];
data/skksearch-0.0/main.c:119:11:  [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).
     fp = fopen(conf, "r");
data/skksearch-0.0/dic.c:50:33:  [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 (strncmp(dicstr, "dummy:", strlen("dummy:")) == 0) {
data/skksearch-0.0/dic.c:51:44:  [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).
    d = (void *)dic_dummy_open(d, dicstr + strlen("dummy:"));
data/skksearch-0.0/dic.c:55:38:  [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).
  else if (strncmp(dicstr, "plain:", strlen("plain:")) == 0) {
data/skksearch-0.0/dic.c:56:44:  [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).
    d = (void *)dic_plain_open(d, dicstr + strlen("plain:"));
data/skksearch-0.0/dic.c:60:36:  [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).
  else if (strncmp(dicstr, "cdb:", strlen("cdb:")) == 0) {
data/skksearch-0.0/dic.c:61:42:  [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).
    d = (void *)dic_cdb_open(d, dicstr + strlen("cdb:"));
data/skksearch-0.0/dic.c:65:35:  [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).
  else if (strncmp(dicstr, "db:", strlen("db:")) == 0) {
data/skksearch-0.0/dic.c:66:41:  [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).
    d = (void *)dic_db_open(d, dicstr + strlen("db:"));
data/skksearch-0.0/dic_cdb.c:58:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read(fd, buf, dlen) != dlen) {
data/skksearch-0.0/dic_plain.c:187:9:  [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 (strlen(line) <= keylen) {
data/skksearch-0.0/main.c:127:4:  [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).
	p[strlen(p)-1] = '\0'; /* chop */
data/skksearch-0.0/main.c:147:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((s = read(STDIN, combuf, COMBUFSIZE - 1)) > 0) {
data/skksearch-0.0/main.c:157: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).
      write(STDOUT, version_string, strlen(version_string));
data/skksearch-0.0/main.c:160:35:  [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).
      write(STDOUT, "localhost:", strlen("localhost:"));

ANALYSIS SUMMARY:

Hits = 28
Lines analyzed = 972 in approximately 0.04 seconds (21842 lines/second)
Physical Source Lines of Code (SLOC) = 643
Hits@level = [0]   3 [1]  14 [2]  12 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]  31 [1+]  28 [2+]  14 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 48.2115 [1+] 43.5459 [2+] 21.7729 [3+] 3.11042 [4+] 1.55521 [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.